1

I have already tested some apps for this purpose and they solely rely on the screen turning off, which makes sense at some point. However, their concept breaks down when you want to use an app over WiFi which has the capability to turn-off the screen due to the proximity sensor (think of the VoIP apps). Turning off the screen in that case means disconnection from the network.

Is it possible to turn off the WiFi only if the device is both locked and screen turned off?

0

2 Answers 2

1

If I understand your question correctly, then there is a very easy way of doing this yourself. Im sure there are many ways of going about this, but this is the easiest and most reliable method that I know of.

You said that you wanted something that doesn't rely on the screen being off. My solution does rely on the "display" being off, however for the "display" as opposed to the "screen" to be off, the device must be locked, meaning that this should work flawlessly for you.

If you just follow the instructions I've provided below, you should have satisfying results in just a few minutes!


  1. Download Tasker from the Play Store.
  2. Open Tasker and click the + button. Now click EventDisplayDisplay Off.
  3. Click the gear (back button) in the top left corner. A pop up menu will appear. Select New Task and name it Display Off.
  4. Tap +NetWiFi and make sure the box that says Set is set to Off.
  5. Click the gear (back) twice so that you end up on the Profiles screen.
  6. Now click + again, then EventDisplayDisplay On.
  7. Tap the gear (back) and then select New Task. Name it something along the lines of Display On.
  8. Click +NetWiFi and change Set to On. Now exit back to the Profiles tab. You should now have both Display Off and Display On.
  9. In the Profiles tab to the right of your conditions, there are On/ Off toggles. Turn both of these to Off and then back to On.
  10. Simply exit out of Tasker and you're done!

Good luck and I hope this helps you!

3
  • how will this behave in case that I use an app which turns the display off due to proximity sensor? Will it turn off the wifi radio then as well? May 7, 2015 at 15:38
  • @KristofPal it should turn off the wifi radio with the app your talking about. May 9, 2015 at 19:29
  • Do you need root for this? Nov 15, 2017 at 20:00
0

If I understand the question correctly... There is a setting under WiFi -> More -> Keep WiFi on during sleep

wifi settings

click image for larger version

2
  • 1
    forgot to mention I tried that... still able to ping the phone when locked... wierd May 6, 2015 at 20:57
  • This is probably because with all apps running, the phone never enters sleep mode, so the setting is pretty much useless.
    – Fredrik
    Nov 15, 2017 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .