Thank u for ur reply. On Thu, Jan 28, 2010 at 3:15 PM, Chander Pechetty <cspeche...@gmail.com>wrote:
> use ConnectivityManager and probably add the permission - > ACCESS_NETWORK_STATE to manifest file > > On Jan 28, 12:31 pm, "Sasikumar.S" <sasikumar.it1...@gmail.com> wrote: > > Thank You for ur reply Jian, > > > > I will check it and tell to you. > > > > > > > > On Thu, Jan 28, 2010 at 12:55 PM, Jian Chen <ustcchenj...@gmail.com> > wrote: > > > ah, then let us come to the question how to check internet connection > is > > > not enabled or not. > > > Hope that below code will help. > > > @Override > > > public void onStart() { > > > super.onStart(); > > > ConnectivityManager cMgr = (ConnectivityManager) > > > this.getSystemService(Context.CONNECTIVITY_SERVICE); #1 > > > NetworkInfo netInfo = cMgr.getActiveNetworkInfo(); #2 > > > this.status.setText(netInfo.toString()); > > > } > > > > > ConnectivityManager can help u know current network status. > > > > > 在 2010年1月28日 下午3:16,Sasikumar.S <sasikumar.it1...@gmail.com>写道: > > > > > Hi alligator, > > > > >> Thank u for ur reply. > > > > >> I know how to create a alert dialog.. > > >> I need how to check whether internet connection is enabled or not?.. > > > > >> 2010/1/28 alligator <ustcchenj...@gmail.com> > > > > >>> I think an alertdiaglog can do it. > > > > >>> Dialog dialog=new AlertDialog.Builder(this) > > >>> .setTitle("about") > > >>> .setMessage("author:ddd\n") > > >>> .setPositiveButton("OK", new DialogInterface.OnClickListener() > > >>> { > > >>> public void onClick(DialogInterface dialog, int > > >>> whichButton){ > > >>> return; > > >>> } > > >>> }) > > >>> .create(); > > >>> dialog.show(); > > > > >>> On 1月28日, 下午1时40分, "Sasikumar.S" <sasikumar.it1...@gmail.com> wrote: > > >>> > Hi, > > > > >>> > How to find whether internet connection is working or not in > android > > >>> > emulator?... > > > > >>> > I'm doing one RSS Program. > > >>> > When internet connection is not enable the RSS feed is not fetching > the > > >>> data > > >>> > and it is showing error. > > >>> > So if internet connection is not enable i need to display a alert > that > > >>> > "Internet Connection Not Enabled" > > > > >>> > How to do this?... > > > > >>> > -- > > >>> > Thanks & Regards > > >>> > Sasikumar.S > > > > >>> -- > > >>> 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<android-developers%2bunsubscr...@googlegroups.com> > <android-developers%2bunsubscr...@googlegroups.com<android-developers%252bunsubscr...@googlegroups.com> > > > > >>> For more options, visit this group at > > >>>http://groups.google.com/group/android-developers?hl=en > > > > >> -- > > >> Thanks & Regards > > >> Sasikumar.S > > > > -- > > Thanks & Regards > > Sasikumar.S > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Thanks & Regards Sasikumar.S -- 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