I need to turn off the WiFi a while after pressing the “Turn off the Screen” button. There is a need for this app for my tablet because sometimes I just forget to turn off the WiFi and this discharges the battery very fast. It lives 10x+ times less than I would without WiFi.
Is there any solution available as .apk? Can I track when the screen turned off and 5 min elapsed? Can I programmatically turn off WiFi on Android device? How?
I need to turn off the WiFi a while after pressing the Turn off
Share
You need the following permissions in your manifest file:
Then you can use the following in your activity class:
Use the following to check if it’s enabled or not
You’ll find a nice tutorial on the subject on this site.