Android Beacon Library

An Android library providing APIs to interact with Beacons

Home Download Quick Start Sample Code Docs Support

Transmitting as a Beacon

As of version 2.1, the library supports transmitting as a variety of beacon types. Below is an example of transmitting as an AltBeacon. In order to transmit as other proprietary beacon types, you will need to set the beacon layout for the type. You may also set the manufacturer code to match the company owning the beacon standard. A list of company codes can be found here.

Beacon beacon = new Beacon.Builder()
        .setManufacturer(0x0118) // Radius Networks.  Change this for other beacon layouts
        .setDataFields(Arrays.asList(new Long[] {0l})) // Remove this for beacon layouts without d: fields
// Change the layout below for other beacon types
BeaconParser beaconParser = new BeaconParser()
BeaconTransmitter beaconTransmitter = new BeaconTransmitter(getApplicationContext(), beaconParser);	
beaconTransmitter.startAdvertising(beacon, new AdvertiseCallback() {

            public void onStartFailure(int errorCode) {
                Log.e(TAG, "Advertisement start failed with code: "+errorCode);

            public void onStartSuccess(AdvertiseSettings settingsInEffect) {
                Log.i(TAG, "Advertisement start succeeded.");

Compatible Devices

In order to support beacon transmission, a device must have Android 5.0+, a Bluetooth LE chipset that supports peripheral mode, and a compatible hardware driver from the device manufacturer. Check here for a list of devices that are known to support or not support transmission.

The easiest way to see if another device is compatible is to download the Locate app for Android, and attempt to use it to transmit. If the device is not compatible, the app will tell you.

Checking for support programmatically

Using the library, you can check if a device supports transmission by calling:

int result = BeaconTransmitter.checkTransmissionSupported(context);

If the device supports transmission, the method returns BeaconTransmitter.SUPPORTED. It may also return:


The NOT_SUPPORTED_CANNOT_GET_ADVERTISER_MULTIPLE_ADVERTISEMENTS, NOT_SUPPORTED_MULTIPLE_ADVERTISEMENTS and NOT_SUPPORTED_CANNOT_GET_ADVERTISER return typically indicates that the device either does not have a compatible chipset, or the manufacturer has not implemented the driver support required by Google for the Android 5.x BLE transmission APIs.