Hi all,
would someone kind enough to let me know what I am doing wrong with
the following code. I would like to get the network status using the
ConnectionManager, but everytime I made call to it crashed:
ConnectivityManager cm =
ConnectivityManager)mActivity.getSystemService(mActivity.CONNECTIVITY_SERVICE);
NetworkInfo netinfo = cm.getActiveNetworkInfo(); <<<< IT
CRASHED
HERE
if(netinfo.getState() != NetworkInfo.State.CONNECTED){
// display network not available alert
return null;
}
Thank you very much for your help,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---