Location & Battery Drain (Android Performance Patterns Season 3 ep7)

Android Developers · 21K views · 2015 · 4:29

Open on YouTube

Software performance & optimizationConsumer devices & gadgetsexplainerdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about Android location accuracy versus battery drain and how to tune update intervals.

Recommended by 3 people across 3 different months, 2015 to 2015.

What it is

A short episode of the Android Performance Patterns series from Android Developers, presented by Colt McAnlis. It explains how GPS and location hardware drain battery and how update interval and accuracy settings affect power use.

What people said

Recommends Colt McAnlis · 2015-08 · Stack Overflow · on “Does coarse location use less battery than geofences on Android?”

The answer here might be a combination of things. The Location and battery Drain [this video] video explains more about how the GPS & Location chips burn up battery in your device. ( Battery Drain and Networking [LINK] will detail how the Radio chips work.) Basically, using a FusedLocationProvider [LINK] will allow you to scale back accuracy vs. power drain. Basically less-resolution results in less battery drain. Knowing that, I'd suggest a set of low-power checks as early-warnings before moving to the higher-power checks: Use ConnectivityManager [LINK] to determine if the mobile device is on the CellularNetwork or not. If they are, there's a good chance they've moved outside of the wifi boundri

Recommends Colt McAnlis · 2015-08 · Stack Overflow · on “Android location tradeoff between accuracy and battery consumption”

The Location and Battery Drain [this video] video from Android Performance Patterns [LINK] might shed some more info on your problem. The basic issue comes down to finding a balance between Location Resolution, and Location Update Frequency. If you mark "setInterval" at too high of a rate, then you'll be constantly banging on the GPS chip to grab location, and thus wasting battery for each ping. Even worse, is still getting pings when you don't need them (like when the app is in the background) Setting it too-low, of course then doesn't update your app fast enough. The ideal scenario is to adjust the interval based upon need, and only use what you need. On the resolution side, it's all about usin

Recommends ThanosFisherman · 2015-09 · Stack Overflow · on “locations are received before locationRequest.setFastestInterval”

Lowering the setFastestInterval rate will most likely result in more stable location updates. Also Check out this video for more info: [this video]

Recommends Leonardo · 2015-10 · Stack Overflow · on “How to decrease usage of battery in android”

Since your question is too broad, it's complicated to help you. You really should use Android Studio tools to see where your battery life is getting hurt. I really really recommend checking this channel, with battery improvements patterns: Link here [LINK] The videos I recommend are: [this video] [LINK] [LINK]