Does Android ProximityAlert or Geofence drain more battery when the phone is closer to a monitored location?
Asked Answered
A

2

7

If I use an Android ProximityAlert with a given radius (say 100m), and my phone is regularly near (or at) that location, will the battery drain be greater than if I am rarely near that location? Is there a distance within which the battery drain increases?

What about with Geofences instead?

Ideally, I'd like to understand the impact on battery life of the following scenarios:

R = radius of the proximityAlert or Geofence area D = distance of phone from location in proximityAlert

  • D < R (phone definitely within proximity alert location)
  • D >> R (phone definitely outside proximity alert location)
  • D ~= R (phone near boundary of proximity alert location)

Is there any particular location (ie value of D or of D-R) where the phone will automatically change location provider to a more expensive option to increase accuracy?

Abuzz answered 18/6, 2013 at 9:52 Comment(3)
I have two identical test phones, which I'm using to test battery life in different scenarios. Currently, I've set up a location at my home, which means I'm always in the case where D < R, and I'm wondering if that's a meaningful test, or if I'm seeing a worst case scenario. I plan to test it more thoroughly, but it takes time, and I'm hoping that someone else has already done this :-)Abuzz
I rest my case, its a difficult problem ( I mean the life of phone, the battery life, other apps running) to solve. Crazy. Upvote.Minacious
Great question. I'd love to hear more from Google about the cost on battery life of registering geo fences. Also does it make a difference if you have 1 fence vs 300 fences?Roentgenogram
M
0

When you go near the geofence , the GPS gets turned on more often to check the users "FINE_LOCATION" and when you are not close to the monitored location the phone uses "COARSE_LOCATION" which uses the cell phone towers and 3g/4g networks to get the phones current location. The "FINE_LOCATION" (needing GPS) will drain more battery than "COARSE_LOCATION".

this is why we need to set both the COARSE_LOCATION and FINE_LOCATIONS in the Android Manifest.

Mandamus answered 3/9, 2013 at 12:40 Comment(1)
When you said: "When you go near the geofence , the GPS gets turned on" That is not correct. In my testing, the GPS does NOT get turned on by Android when you get close to fences. I know this because,the gps takes a long time to turn on (like up to 60 seconds) and there should be an icon in the status bar indicating that GPS is on. I haven't seen those things in my testing. Also, I've found that Android can be VERY accurate (within 5 meters) with just wifi on, when you get in range to a wifi network.Roentgenogram
H
-1

Proximity alert will fire up gps, if it turned off , every after 4 minutes in order to update your location. you may not realize it, but to add something to your tests, add a broadcast receiver to constantly monitor the state of gps, and then test it within a 4 minute span

Hinckley answered 4/4, 2014 at 12:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.