What kind of crash was it? Was it an exception? If so, what exception
was it and what info it had?
On Nov 6, 4:04 pm, redmapleleaf <[EMAIL PROTECTED]> wrote:
> 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 android-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---