2
Solved

Wifi Near State Doesn't Work when Screen Off

Device OnePlus CPH2399 ("Nord 2T")
Android 12
Tasker version 6.0.10

The state Wifi Near doesn't trigger when device's screen is off (device is locked). Only first after the device's screen goes on (device gets unlocked) does the state trigger. Other actions e.g. Beep, Perform Task, etc., can trigger when screen is off. Location Net context also can trigger when screen is off.

Tasker should make a native workaround analog to Net/Cell Wake Screen.

1 reply

Hi. Wifi Near does work for me with the screen off. Maybe there's some custom restriction on your device?

Be aware that Tasker can only scan for Wifi networks every 30 minutes or so, so it may take a while for it to trigger.

"Be aware that Tasker can only scan for Wifi networks every 30 minutes or so, so it may take a while for it to trigger."

That is very very worthy to make it into the official documentation of Tasker. That is most probably also what happens with my device.

Also, it'd be very nice if not straight necessary, that that rather disappointing behavior  of Android gets mitigated by Tasker. The clever dev behind Tasker would surely come up with a creative solution. Because having that state triggers only every 30 min. would be almost as good as not having the automation at all.

A possible use-case : User goes into a big commercial building (e.g. supermarket) where there's no mobile network ; The only way to get online there is by connecting to the building's Wi-Fi, otherwise the user's phone will be totally offline and he/she therefore totally unreachable. User's phone's Wi-Fi is always off and needs to be manually turned on. User wants to automate this with Tasker, because he/she always forgets to manually turn on Wi-Fi in that building (that user more often than not doesn't even unlock his/her phone [so that his/her phone's screen goes on]). The automation is essentially: When that building's Wi-Fi is near, then turn on Wi-Fi. User spends time in the supermarket less than 30 min.

In that use-case, it's very well possible, that that user spends time in the building (at max. 30 min.) without Tasker scanning for Wi-Fi networks AT ALL. This is the same as not having the automation at all. Of course there are other solutions like turn on Wi-Fi by not using the context Wi-Fi Near, but instead Location Net or even GPS. But this would go against that user's policy e.g. to save battery or for security reasons.

So, I've done some testing. The assumption that Tasker (for the state Wifi Near) scans for Wi-Fi networks every 30 min. (whilst device's screen is off) in my device, is NOT true. Tasker still does that only first after the device's screen goes on, and worse, only after the device gets unlocked.

There's no end-user-controllable custom restriction on the device regarding Location - Wi-Fi Scanning. Could be a OnePlus / Oxygen OS (OnePlus' Android flavor) thing. Bummer. Scanning only every 30 min. is already bad, not at all is just on another level. These kinds of thing make me wonder, why do 3rd party companies really bother to change such system-level behaviors, instead of, I don't know, really focusing just on the hardware and selling phones. Why can't they just make the best hardware, while Google just makes the best software, and in the end everybody wins... Why do phone companies really have the need to fragment an OS... They can just make brand-exclusive apps or features (e.g. a certain camera functionality is only available on Samsung devices, etc.), but no, they also need to do every single thing under the hood also different... For what... SMH.

Hi. I've seen this special toggle in my device's developer setings. Does it maybe also exist in yours? Maybe it helps?

https://imgur.com/gEtrjT7

What a nice idea, thank you!! Will check.

Topic is closed for comments