Android Wear Device as iBeacon

1.6k views Asked by At

Is it possible to use an Android Wear device as a Bluetooth Low Energy beacon, separately from its connection to the phone?

I'm working with iBeacons that connect to both iOS and Android devices, and the iBeacon (Bluetooth Low Energy) capabilities of various mobile devices vary widely.

Most of Apple's devices (iPhones, recent iPads, and laptop/desktop devices) can transmit as an iBeacon. Only certain recent Android devices can do so, e.g. the Nexus 6 and Nexus 9.

I just purchased a Moto 360 to play around with and it does use BLE to transmit to the paired device, but I'm curious if I can write an app that will cause it to transmit arbitrary packets and an arbitrary UUID. Has anyone done that? It seems as though it should be possible. I've gone through the Android Wear developer's site but have not found any discussion of this topic.

Thanks for any ideas, links to web sites, etc.

1

There are 1 answers

2
der_michael On

UPDATE:

I just test my answer below and it seems like the Android.Bluetooth.LE namespace is not available for Android Wear. I'm afraid I have to say that (currently) it is not possible for an Android Wear device to broadcast as a beacon using native java Android.

EXPLANATION:

You can perform that test yourself. You mentioned you have a Moto 360. Just deploy a test app to it that gets the Bluetooth system service as BluetoothManager and test wether the adapters BluetoothLeAdvertiser property is not null.

((BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE))
.getAdapter().getBluetoothLeAdvertiser() == null

((BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE))
.getAdapter().isMultipleAdvertisementSupported() == null

You can use Android's native beacon broadcasting libraries or use a 3rd party library like AltBeacon to broadcast arbitrary beacon data.