// To use this WifiManager method, AndroidManifest.xml must have the 
following permission:

// <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

WifiManager wifiManager = (WifiManager) getSystemService(Context.
WIFI_SERVICE);

 if (!wifiManager.isWifiEnabled()) wifiManager.setWifiEnabled(true);

On Thursday, August 9, 2012 11:31:57 PM UTC-5, Meena Rengarajan wrote:
>
> When i click button, Wifi should be in "ON" state by programmatically , if 
> it is not connected (ON state) then Alert Dialog box must appear by saying 
> , "Are you wanted to enable Wifi/ Disable" like "OK" or "Cancel". If i 
> click "Ok" then Wifi should be connected (ON ) state , if i click cancel 
> then application should be closed.
>
> Can anyone help me here please ? I am very new to this technology .. 
>

-- 
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

Reply via email to