hi kris, Now i am using socket connection, and it give the message "The application video (process com.tcp.video) has stopped unexpectedly. please try again". so the user will not under stand whats going wrong. so i want to first check for internet connection first and if it is not connected then display the message that user can understand. try { socket = new Socket("IP", 8888); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace();try } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }
Thanks and Regards, umer > Date: Thu, 23 Feb 2012 02:37:01 -0500 > Subject: Re: [android-developers] when internet connection don't exists, show > me massage. please help!! > From: krismicin...@gmail.com > To: android-developers@googlegroups.com > > On Thu, Feb 23, 2012 at 2:26 AM, muhammad.ume...@hotmail.com > <muhammad.ume...@hotmail.com> 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. > > > > > > Why do you want to do this? Why not gracefully handle a connection > error and instead display some helpful output, rather than killing off > your app so eagerly? > > kris > > -- > 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 > android-developers+unsubscr...@googlegroups.com > 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en