Search code examples
androidibeaconaltbeaconandroid-ibeacon

Does alt beacon support multiple siloed "clients" within the same app?


In my Android app, I'm using a library that's based on alt beacon, but would also like to range for beacons in "my code".

Does alt beacon support multiple "clients". It seems as if the other library is removing regions that I'm ranging. When I'm turning off the other library, all works fine, but when I turn it on, the ranging that I'm doing stops.

Question: Is there any function in alt beacon to specify a different slot (and then using different BeaconServices)?


Solution

  • The Android Beacon Library is self-contained and siloed within a single Android App. Two apps using the library do not interfere with eachother's ranged and monitored regions, because all state is internal to the app.

    Within a single Android app, however, there is no built-in functionality that allow you to silo multiple clients. The BeaconManager is a singleton, and only allows you to set a single notifier for ranging and monitoring. What's more, each monitored region has an in/out state that is tracked app-wide.

    If you want to be able to have multiple independent clients within an app, it may be possible to build a layer that accomplishes this. You would need to make your own wrapper version of the BeaconManager, which allows multiple clients to connect and delivers events based only on their registered regions.