andymoris wrote: > hi,Mark, > i got errors in returning statement? do i need to catch the return > value and display the status?
I am not certain that I understand the question. The code I listed was intended to be the body of some method. Here is a larger listing: public boolean iCanHasDataNowKThxBye() { ConnectivityManager connMgr=(ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info=connMgr.getActiveNetworkInfo(); return(info!=null && info.isConnected()); } You would call that method when you need to know if there is some form of data connectivity presently available. What you do with that information is up to you. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Need Android talent? Ask on HADO! http://wiki.andmob.org/hado --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---