I'm wondering if anyone has any pointers around trouble-shooting battery drain on apps?
We have an app that several users of Android phones have told us the OS is popping up a warning that it is draining the battery. Is reporting usage of around 1% per hour. This is in spite of the app not actually being active - in fact, on my test phone the phone was actually in lock mode for the past couple of hours.
Background gps location is not enabled.
The only thing I can think is that there is a timer running that triggers every few minutes - does anyone know if this timer continues running when the app is not active and/or the phone is in sleep/lock mode?
Is this happening with any particular app or all the apps? Could you please provide more info about the app? What does the app do? If the app has any particular functionality which is not present in your other apps? How can we reproduce it at our end?
Any steps to reproduce would be helpful.
Yeah, that's what I'm trying to establish - ie. what it does different from other apps.
My best guess so far is that there is a timer that runs. I checked and it appears that QML Timer runs even in the background (which I guess makes sense). I just didn't think it would consume much battery. I've changed my logic slightly so that the timer stops running when the app becomes inactive, and starts up again when the app becomes active. Means I had to change slightly the purpose of the timer which was to check something every so often, but of course if I don't know how long the app has been inactive that didn't work! So now I timestamp a setting and check that again when the timer starts up.
I've got that app into testing now so will see if that makes any difference.
The original question still stands - if anyone has comments or suggestions on other things to watch out for that drain battery please feel free to post here.