Search code examples
androidibeaconbattery

Ranging iBeacons in Android and devices battery life


My question is fairly simple, but all the cases that led to it aren't.

Let's say I have many iBeacons with the same UUID. You are placed in an environment you don't really know which beacons are around you. You do have an app monitoring for that general UUID.

How do you efficiently get the majors and minors of the iBeacons around you in Android?

Issue is that iBeacons and you can move, form groups (so be really close to each other), disappear for a while from your radio range etc.

From what I gathered, I'm left with constant ranging this UUID, which will consume battery. Is there a way to avoid it, even partially, or be more clever than that?


Solution

  • When beacons with different identifiers are always in range, then yes, constant ranging is the only way you can get the majors and minors, and this will consume a fair amount of battery.

    Solutions all depend on your use case. A few questions you might ask yourself:

    1. Can you live with periodic ranging, say on a 10% duty cycle?
    2. Are there any event triggers that can be used to start ranging?
    3. Can you design the beacon layout such that they are not always in range?
    4. Can your app function only in the foreground?