Loading...

android-developers@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

RE: [android-developers] Re: when internet connection don't exists, show me massage. please help!! Muhammad UMER Thu Feb 23 00:01:07 2012

hi S.Seshu,
                   Thanks for your great help, Please tell me how to exit form 
app when it return false.Thanks again.


Regards,

umer 

> Date: Wed, 22 Feb 2012 23:36:02 -0800
> Subject: [android-developers] Re: when internet connection don't exists, show 
> me massage. please help!!
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> 
> Hi Umer,
>  Use this method
> 
> private boolean isNetworkAvailable() {
>     ConnectivityManager connectivityManager
>           = (ConnectivityManager)
> getSystemService(Context.CONNECTIVITY_SERVICE);
>     NetworkInfo activeNetworkInfo =
> connectivityManager.getActiveNetworkInfo();
>     return activeNetworkInfo != null;
> }
> 
> 
> and add this one in manifest  file
> <uses-permission
> android:name="android.permission.ACCESS_NETWORK_STATE" />
> 
> Thanks and Regards,
> S.Seshu
> 
> On Feb 23, 12:26 pm, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >     My app is depends on internet, so I want that if the mobile is not
> > connected to internet then my app show the message to the user that
> > "internet not connected" and exit the application. give me any
> > suggestion.
> >
> > Thanks and Regards,
> >
> > umer
> 
> -- 
> 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
                                          

-- 
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