# Android TagTime Doze incompatibility

**URL:** <https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261>\
**Category:** TagTime\
**Created:** [June 20, 2017, 8:56pm UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261 "2017-06-20T20:56:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hudson](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@hudson](https://forum.beeminder.com/u/hudson)\
**Post date:** [June 20, 2017, 8:56pm UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/1 "2017-06-20T20:56:13Z")

</div>

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 🙂

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)

---

<div class="post-metadata">

**Author:** ![scarabaea](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/scarabaea/32/5475_2.png) [@scarabaea](https://forum.beeminder.com/u/scarabaea)\
**Post date:** [June 22, 2017, 6:25am UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/2 "2017-06-22T06:25:23Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![fwerpers](https://avatars.discourse-cdn.com/v4/letter/f/d2c977/32.png) [@fwerpers](https://forum.beeminder.com/u/fwerpers)\
**Post date:** [June 22, 2017, 7:22pm UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/3 "2017-06-22T19:22:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![scarabaea](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/scarabaea/32/5475_2.png) [@scarabaea](https://forum.beeminder.com/u/scarabaea)\
**Post date:** [June 25, 2017, 7:51am UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/4 "2017-06-25T07:51:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hudson](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@hudson](https://forum.beeminder.com/u/hudson)\
**Post date:** [June 25, 2017, 9:55pm UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/5 "2017-06-25T21:55:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![imoatama](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/imoatama/32/1405_2.png) [@imoatama](https://forum.beeminder.com/u/imoatama)\
**Post date:** [July 19, 2018, 5:32am UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/6 "2018-07-19T05:32:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![insti](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/insti/32/545_2.png) [@insti](https://forum.beeminder.com/u/insti)\
**Post date:** [August 7, 2018, 7:02am UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/7 "2018-08-07T07:02:26Z")

</div>

> [@imoatama](#):
>
> I will report back if this fixes the missed pings.

Did it?

---

<div class="post-metadata">

**Author:** ![imoatama](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/imoatama/32/1405_2.png) [@imoatama](https://forum.beeminder.com/u/imoatama)\
**Post date:** [August 7, 2018, 2:40pm UTC](https://forum.beeminder.com/t/android-tagtime-doze-incompatibility/3261/8 "2018-08-07T14:40:44Z")

</div>

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.
