Beeminder Forum

Android TagTime Doze incompatibility


#1

For a while now Android version stops pinging once the device goes into Doze Mode. It’s not something you can whitelist because the issue is the alarm, which is not affected by whitelisting.

It should be a very simple fix, basically just replacing this line in PingService.java

alarum.set(…
with alarum.setAndAllowWhileIdle(…

but I have zero time these days to build and test etc. Obviously I haven’t been using Tagtime either :slight_smile:

Of course this will basically kill most of the power-saving benefit you get from Doze. It will also still register an OFF when the two pings are very close (less than 9 minutes or a bit more)


Wanted: An Idiot's Guide to Installing TagTime on a Windows Machine
#2

Oh, so this is what has been happening to my TagTime on my newer phone… I have had to literally put an older phone on volume with only TagTime running there so that I could still get pings…


#3

I’m on Android 7.1.1 on a ZTE Axon 7 and initially I would get OFF tags if the screen was off.
However, MiFavor on the Axon 7 has “power-saving policies” and after turning them off for TagTime I get all the ping notifications.
Not sure if these settings override the “stock” battery settings or something…

@scarabaea, have you tried turning off any battery optimisations for TagTime on your newer phone?


#4

@fwerpers, thanks for your suggestion, I have tried turning off everything I could find, but maybe there are more obscure (for me) settings…


#5

I’m not familiar with MiFavor, but typically none of the Android power settings affect Doze mode (which is the culprit here)- it’s always active.

There is a way to disable Doze by attaching to PC and executing a command, but you would have to do it every reboot.


#6

Sorry to necro a thread, but do we know if tagtime has problems with Doze? It seems like it does - looking at my andorid tagtime log, and any pings within 9 minutes of the previous have OFF for their tag.

My phone allows me to turn Doze off on a per app basis, (LG V20 on Nougat, settings are under Battery & power saving -> Battery Usage -> Ignore Optimizations, then select the app). I will report back if this fixes the missed pings.


#7

Did it?


#8

Yes and no. The number of failed pings definitely seems to have dropped a lot, and there are now pings occuring within 9 minutes of each other even when my phone screen is off. But I am still getting failures for pings to notify - ie pings where all that is recorded is OFF and I never see a notification for it.