10 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
5 star 6
4 star 3
3 star 0
2 star 1
1 star 0
Compatible with
  • Android

Android AltBeacon Library 2.7

Chris Riesgo

Proximity beacon ranging and monitoring library for Xamarin.Android apps.

A Xamarin.Android binding of the AltBeacon Android Beacon Library. This library allows Android apps to interact with BLE beacons in accordance with the open and interoperable AltBeacon proximity beacon protocol specification.

What does this library do?

Allows Android apps to interact with BLE beacons.

Reference Application

For a simple working example of Ranging BLE beacons with Xamarin.Android, check out the Sample Application.

Release Notes

From library release notes:

Everything since 2.1.4:

Features changes:

  • Optionally allow tracking multiple beacons with the same identifiers, distinguishing with the mac address.
  • Support for Gatt-based beacons and interleaved frames
  • Filter out invalid RSSI values of 127 for distance calculations
  • Identifier class now supports conversion to/from the UUID class.
  • Optionally allow using an ArmaRssiFilter for faster distance calculation convergence.
  • Support detection of Eddystone-UID, Eddystone-TLM and Eddystone-URL
  • Support transmission of Eddystone-UID and other GATT-based formats
  • Add more options for parsing identifiers of specific lengths
  • When scanning in Background on Android 5+, do a full scan without filters during the main scan period (default for 10 seconds once every 5 minutes) in case scan filters are unavailable
  • Common open-source BeaconParser layouts are defined as constants on BeaconParser
  • Bluetooth address is now a field on Region, offering the option of monitoring and ranging for all beacon transmissions from a known device's MAC Address
  • Target SDK bumped to 23 for Android 6.0
  • Adds hardware accelerated detection of Eddystone frames in the background on Android 5+
  • Provides ability to forward BLE scan callbacks for non-beacon advertisements

Bug Fixes:

  • Workaround for 500 alarm limit on Samsung devices.
  • Fix NPE in scanning for beacons on Lollipop in the emulator
  • Restart scanning after app is killed due to memory pressure
  • Protect against crashes when falling behind on scans
  • Protect against null pointer exceptions in race conditions
  • Protect against crash when stopping advertising with bluetooth turned off
  • Stop BLE scanning after stopping ranging of the last region
  • Fix for NPE on Galaxy Note 4
  • Keep from getting stuck in background mode after stopping and restarting service
  • Protect against Null Pointer Exceptions when dynamically adding and removing monitored/ranged regions
  • Protect against an underlying Android BLE bug that sometimes causes Null Pointer Exceptions when starting stopping scanning.
  • Ignore corrupted beacon BLE packets instead of throwing an exception about them
  • Use a private ThreadPoolExecutor for beacon scanning to avoid thread starving apps using AsyncTask
  • Allow missing data fields, setting data values to zero if data fields missing in packet
  • If a custom AltBeacon parser is supplied, don't crash with NPE if it is not found
  • Android 5.x devices could not detect AltBeacons on with unusual manufacturer codes in versions 2.3 and 2.3.1 due to Android 5.x BLE scan filters being inadvertently enabled in the foreground.
  • Improve handling of PDUs with unexpected lengths.
  • Add ability to optionally shorteten Beacon identifiers if their max length can be longer than the PDU.
  • Fix improper termination of URLs on URI Beacons causing an extra byte to show up on the end.
  • Identifer.parse("0") is now handled properly. A bug in the previous release did not handle it properly leading to ranging/monitoring failures on regions with such an identifier.
  • Switch BeaconParsers list to be a CopyOnWriteArrayList to avoid UnsupportedOperationException changing list after starting scanning.
  • Fix crash when region has more identifiers than beacon
  • Fix bugs with compressing Eddystone-URL to bytes and back
  • Allow Regions to match beacons with fewer identifiers if the extra region identifiers are null. This allows matching Eddystone-UID and Eddystone-URL beacon with the default Region with three null identifiers. This started failing in version 2.6.
  • Declare the ACCESS_COARSE_LOCATION permission in the manifest since it is required for Android 6.0. This is helpful to keep beacon detection working on Android 6.0 for apps that don't explicitly declare this in their own manifest.
  • Fix rescheduling of alarms in the distant future so they don't inadvertently go off right away
Write a Review

6 reviews

Frederic LUCAZEAU rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Please update the component dependencies!

Current AltBeacon native lib is now two years old (v2.7, actually v2.9) The last version fixes major issues under Android 7.

Thanks you.

Posted on: May 30 / Version: 2.7
Srikrishnan M

Could you please update the component

Posted on: May 16 / Version: 2.7
Mikhail Melnik rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

Could you please update component to use the latest version of AltBeacon library?

Posted on: June 30, 2016 / Version: 2.7
Carlos Campos

This can work with Gimbal beacons? either on Gimbal type or iBeacon Configuration?

Posted on: January 7, 2016 / Version: 2.7
Haluk YILMAZ rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

can we work as background?

it says 5 minute but how we handle?

i just test on logs, when goes background dont refresh itself?

Posted on: October 25, 2015 / Version: 2.0
Kenneth Egholm rates this with
  • 1
  • 2
  • 3
  • 4
  • 5

This is really cool.

Thank you very much Chris!

Posted on: December 9, 2014 / Version: 2.0