Hi,
Try this code;
In yes button click
WifiManager wifiManager =
(WifiManager)this.context.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(status); status =true or false
Regards
On Fri, Aug 10, 2012 at 11:18 AM, Meena Rengarajan
<[email protected]> wrote:
>
> How to Enable Wifi automatically in Android 2.2 in an alert box ? If i click
> Yes button then it should be enable and if i click no then application must
> be closed. Can anyone tell me this how should i do ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en