Q:

Start app while network is unable stop app message

When I start my app while the network down, the app stops without message at: annotate is new SSIDAsync().execute();.
What is the problem? 
Here is code:
public static TextView ssid = null;  // Global variable 

new SSIDAsync().execute();    //onresume ()

public class SSIDAsync extends AsyncTask<Void, Void, String > {
   @Override
   protected void onPreExecute(){
       super.onPreExecute();
   }

   @Override
   protected String doInBackground(Void... params) {
       WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
       ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
       NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
       String m_strName = new String();

       int m_iNetworkType = activeNetwork.getType();
       //WI-FI 
       if (m_iNetworkType == cm.TYPE_WIFI) {
           m_strName = wifiManager.getConnectionInfo().getSSID();
       }
       //Ethernet
       else if (m_iNetworkType == cm.TYPE_ETHERNET) {
           m_strName = "connected ethernet";
       }
       // unableNetwork 
       else {
           m_strName = " unable network ";
       }

       String newStrName = m_strName.replace('"',' ');

       return newStrName;
   }  

   @Override
   protected void onPostExecute(String ssidresult){
       super.onPostExecute(ssidresult);
       if(ssidresult!=null){
           ssid.setText(ssidresult);
       }
   }
}

Log picture here and here

A:

Change your doInBackground to:
@Override
 protected String doInBackground(Void... params) {
     WifiManager wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
     ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
     NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
     String m_strName = new String();

     int m_iNetworkType = activeNetwork.getType();
      //WI-FI 
     if (m_iNetworkType == cm.TYPE_WIFI) {
         m_strName = wifiManager.getConnectionInfo().getSSID();
      }//Ethernet
   else if (m_iNetworkType == cm.TYPE_ETHERNET) {
         m_strName = "connected ethernet";
 }//unableNetwork 
      else {
         m_strName = null;  // <--- Changed here
     }

     String newStrName = m_strName.replace('"',' ');

    return newStrName;

     }  

