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

Reply via email to