1

I just start with IBeacon. There is one is issue specified in IBeacon Android, "If two apps register ranges with the same id, they clobber eachother". I did not get perfect idea about this.

If anybody knows about this then please help me.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
Hardik Joshi
  • 9,477
  • 12
  • 61
  • 113

1 Answers1

2

You don't need to worry about this. In theory, if two apps were sharing the same instance of the Android iBeacon Library, and they both passed the same unique id when defining their Region objects, the second app would overwrite the Region of the first app.

Because there is no easy way to make two apps use the same service instance, this is not a practical concern, except for very advanced users. I put this in the documentation for the library mostly as a note to myself to fix this in the future.

Example (don't do this):

// App 1
Region region1 = new Region("myUniqueId", "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0", 1, 2);
iBeaconManager.startMonitoringBeaconsInRegion(region1);

// App 2 - the startMonitoring call will actually alter the region1 definition above
//         because the two Region objects have the same "myUniqueId" identifier
Region region2 = new Region("myUniqueId", "5A4BCFCE-174E-4BAC-A814-092E77F6B7E5", 3, 4);
iBeaconManager.startMonitoringBeaconsInRegion(region2); 
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • Hello thank you for reply... Here "unique id" means UUID, major & minor values ? – Hardik Joshi Oct 22 '13 at 05:04
  • I have edited my answer to make this clearer. Note that the first parameter when defining a Region is a user-defined unique identifier string. This string must be unique for any Region that is ranged or monitored. If you pass in another Region object with the same value for this identifier, it will overwrite the proximityUUID/major/minor of the previous Region you defined. This works the same as the iOS API. It is convenient for modifying existing Regions, but can burn you if you don't know how it works. – davidgyoung Oct 22 '13 at 12:44
  • Thank you so much for help. I have one more question. without ibeacon device app "can push a coupon to your phone not when you enter the stadium, not when you walk by the gift shop, but when you actually step inside the store" – Hardik Joshi Oct 25 '13 at 13:14
  • I don't think I understand your question. It sounds quite different from the original one above, so I suggest opening a new question. It is probably a good idea to reference what you a quoting, too, so we can understand the context. – davidgyoung Oct 25 '13 at 21:46
  • Ok. Thank you for your help. I will create new question. – Hardik Joshi Oct 26 '13 at 04:35
  • Please help when you get moments : http://stackoverflow.com/questions/19602913/can-android-device-act-as-an-ibeacon – Hardik Joshi Oct 26 '13 at 04:49
  • @davidgyoung , could you please see my question http://stackoverflow.com/questions/28164303/beacon-show-its-present-or-ranging-even-if-beacon-battery-is-removed-what-to – Sheshnath Jan 27 '15 at 12:18