Thanks. But I am not sure if connectivityManager can be use to determine the equipment state.
Example: connectivity = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); wifiInfo = connectivity.getNetworkInfo(ConnectivityManager.TYPE_WIFI); if( wifi.isAvailable() ){ Whether the availability means the network state or connection state, but not the hardware state? And If there are no wifi device in the phone, can we get the wifiinfo using getNetworkInfo? I want to know if the phone have wifi device. Thanks again. 2011/4/1 Mark Murphy <mmur...@commonsware.com> > On Wed, Mar 30, 2011 at 9:57 PM, wawawacool <wawawawac...@gmail.com> > wrote: > > I want to develop an android phone application which is more apt to > > wifi than 2G/3G network. So I want to determine whether the phone > > have wifi device when the application want to use network. But I can't > > find any dierct API in the android sdk document about wifi can > > fulfill this demand. > > > > So I want to ask > > 1. whether android have this API? > > See ConnnectivityManager. > > > 2. If there is'nt this API, can we get this information using indirect > > method, such as function's return value, or exception? > > See ConnectivityManager. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ Version > 1.9.2 Available! > > -- > 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