0

We are using one UUID, and major and minor combinations for different actions. And we need to know major and minor numbers in iOS background monitoring.

The ranging can get major and minor numbers but this needs launching delay and battery consuming. So this is not the proper solution for us because we want immediate detecting and low battery consuming.

So we want to get major and minor numbers in same UUID on iOS background monitoring status. This mechanism is necessary because we make an iOS application not for typical usage.
Is it possible?

cancue
  • 384
  • 3
  • 18

1 Answers1

0

You cannot read individual beacon identifiers using monitoring APIs. All you can do is access the CLBeaconRegion identifiers used to start monitoring. In your case, this is probably just the ProximityUUID with a nil major and minor.

The alternative is to combine ranging with background monitoring. Whenever you get a didEnterRegion event, you will also get ranging callbacks for about 10 seconds afterward, even if your app is in the background. You can use this callback to read all the identifiers.

While it is true that ranging in the foreground uses much more battery than monitoring, background ranging is actually pretty battery friendly. Consider that you will be only ranging for 10 seconds each time you enter or exit a region. (Even though ranging is still turned on, the OS automatically stops it after 10 secs in the background.) Unless you expect user to be constantly entering/exiting regions, then battery should not be a concern with such short periods of background ranging.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • One more question, is it possible that a device transmit beacon signal in a background didEnterRegion event? – cancue Aug 28 '15 at 17:02
  • unfortuantely, no. See here: http://stackoverflow.com/questions/24164523/can-we-start-ibeacon-transmitter-in-background – davidgyoung Aug 28 '15 at 20:57