Turn on Wifi using a Widget
<p>i need to toggle wifi on and off when user clicks a widget icon...</p>

<pre><code>WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE); 
if(wifiManager.isWifiEnabled())
    wifiManager.setWifiEnabled(false);
else
    wifiManager.setWifiEnabled(true);
</code></pre>

<p>How do i implement it using pendingIntents?</p>
