Learn Android for Free,issues for developers, mobengineers website provide complete solutions for developers issues posts.It also provides online training for android development

Thursday, September 27, 2012

WifiManager in Android

WifiManager:


java.lang.object

-  android.net.wifi.wifimanager

WifiManager class provides primary api for managing all aspects of wifi connectivity.

get the instance of this class by calling

contaxt.getSystemService(context.WIFI_Service);

it deals with list of configured networks. this can be viewed, updated.


check wifi status:

ConnectivityManager conMgr;
NetworkInfo netInfo;
WifiManager wifiMgr;

conMgr=(ConnectivityManager)getSystemService(context.WIFI_Service);
netInfo=conMgr.getActiveNetworkInfo();
if(!(netInfo==null))
{
if(WifiMgr.isWifiEnabled())
{
//wifi  enabled
}
else
{
//wifi disabled i.e not available
}
}






0 coment�rios:

Post a Comment

20% off

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

NDTV Gadgets360

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts