[android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread Seshu
Hi Umer, Check the network in 1st Activity only, if network is not available means then call the finish() method. On Feb 23, 1:06 pm, Muhammad UMER muhammad.ume...@hotmail.com wrote: hi kris,           Now i am using socket connection, and it give the message The application video

RE: [android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread Muhammad UMER
hi s.seshu, But i want to show message when internet connection not found before closing the app. Regards, umer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread Seshu
then show the alert box dialog. i.e., AlertDialog.Builder alertbox = new AlertDialog.Builder(this); alertbox.setMessage(Alert); alertbox.setTitle(Network Connection not found); alertbox.setNeutralButton(OK, new DialogInterface.OnClickListener() {

RE: [android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread Muhammad UMER
Thanks s.seshu, It's great help, but how can i restrict the user to not go to next Activity when this error occurs and the user remain in the same activity when ever the user not activate their network connection, Thanks and Regrds, umer Date: Thu, 23 Feb 2012

RE: [android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread Muhammad UMER
hi, I have done something like this on the onCreate() method. when the activity created it first check the network availability if not then show dialog and the finish the application. Is it true approch? if(isNetworkAvailable()!= true) {

[android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread ravi .
u can also use this method //Check weather Internet connection is available or not public boolean checkInternetConnection() { final ConnectivityManager conMgr = (ConnectivityManager) getSystemService (Context.CONNECTIVITY_SERVICE); if (conMgr.getActiveNetworkInfo() != null

Re: [android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-23 Thread Kristopher Micinski
You're doing a lot of stuff just to kill the app off before anything can happen. This just seems like a hacky solution. Why don't you just do it properly and handle the exception by telling the user that the connection died (via a toast, something in the UI, or a notification) and ask them if

[android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-22 Thread Seshu
Hi Umer, Use this method private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); return

RE: [android-developers] Re: when internet connection don't exists, show me massage. please help!!

2012-02-22 Thread Muhammad UMER
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