How should I test Radar battery drain?

To test battery drain attributable to Radar background tracking in your iOS or Android app, you must isolate battery drain attributable Radar's usage of location services.

This means that you must control for confounding variables:

  • In the context of your app, you must control for battery drain attributable to other code and other SDKs running in your app, having the app foregrounded, and notifications.
  • In the context of your device, you must control for battery drain attributable to other apps, the OS, and your device state, including having the screen turned on.

Often, having the screen turned on and the app foregrounded are bigger sources of battery drain than usage of location services.

To isolate battery drain attributable Radar's usage of location services in your app, there are two ways to test:

  1. Install two builds of your app, one with Radar running background tracking and one without. Use your phone for a period of time, ideally a full day, and avoid opening either app (to avoid the confounding variables described above). At the end of the period, compare battery blame for each app on the Battery screen in the device settings.
  2. Install the Radar Toolkit app, a sample app that does nothing but run Radar. Use your phone for a period of time, ideally a full day, and avoid opening the app (to avoid the confounding variables described above). At the end of the period, inspect battery blame for the app on the Battery screen in the device settings.

Note that the Battery screen on iOS and Android shows battery drain attributable to each app not as an absolute percentage, but as a percentage of the absolute battery drain in the battery session.

For example, if the iOS Battery screen shows 2% battery blame attributable to your app and shows that your phone has drained 50% of its battery in the battery session, the absolute percentage attributable to your app is actually 2% * 50% = 1%.

When using the efficiency and responsiveness tracking presets, the SDK will wake up while the user is moving (usually every few minutes), then shut down when the user stops. To save battery, the SDK will not wake up when stopped. For most users, background tracking with these presets uses only 1-2% battery per day (measured in absolute percentage).

See the SDK documentation and Navigating location services tradeoffs between accuracy, frequency, and battery efficiency for more information.


Did this help answer your question?

thumbs up
thumbs down

Thanks for the feedback! 🙏🏽