Android 7 – it’s frustrating!

A little bit of context.

In android 6, we got introduced to a thing called “doze mode”. A very very good feature that detects when you are not using your phone (when you are sleeping, mainly) and turns a lot of it features off. Had a little bit of a problem when working with this as I was developing a GPS app that had to transmit data at all times. The only way to wake up the device is with push notification from GCM (Google Cloud Messaging). Just that sometimes it failed, sometimes it arrived later that we wanted, sometimes it didn’t arrive at all. This change, had huge impact on server side as we had to recalculate a lot of the info that was coming in and try to wake up the device from doze and fallback in case we couldn’t. Though, the impact wasn’t that big, with a 4 hour doze mode windows.

Android 7

Now here comes the part that hurts. With Android 7, google introduced an advanced doze mode, now the device enters this mode after around 20 minutes.doze_mode

Don’t get me wrong, this is a very very good change, especially with android apps written so poorly with unclosed background services, alarm managers, unwanted syncs and other bloatware that squeezes the battery of your phone.

The only solution that I could find is asking the app user, to select not to optimize battery usage for my app. Just that most users are not tech savy people and in one year, when Nougat will be more famous, we’ll have a lot of trouble explaining to people how to do this on their devices.

Leave a Comment


Recent posts