I don't know if its in native API or just my GS3. Wifi direct is automatically turned OFF after 5 minutes of inactivity. Is there is any way of keeping it on? or turn it On programmatically?
Thanks
I don't know if its in native API or just my GS3. Wifi direct is automatically turned OFF after 5 minutes of inactivity. Is there is any way of keeping it on? or turn it On programmatically?
Thanks
You can use the Wi-Fi lock:
WifiLock wifiLock = ((WifiManager) getSystemService(Context.WIFI_SERVICE))
.createWifiLock(WifiManager.WIFI_MODE_FULL, "mylock");
wifiLock.acquire();
When you no longer need the network, you should release the lock:
wifiLock.release();