React Native Module that broadcasts an iBeacon uuid.
npm i --save react-native-ibeacon-simulator
react-native link
Import in your project:
import BeaconBroadcast from 'react-native-ibeacon-simulator'
Start iBeacon on device:
You can get from here http://openuuid.net/
are integer values between 0 and 65535.
BeaconBroadcast.startAdvertisingBeaconWithString(uuid, identifier, major, minor)
BeaconBroadcast.stopAdvertisingBeacon()
BeaconBroadcast.stopAdvertisingBeacon()
BeaconBroadcast.startAdvertisingBeaconWithString(uuid, identifier, major, minor)
BeaconBroadcast.checkTransmissionSupported()
.then(() => {
BeaconBroadcast.stopAdvertisingBeacon()
BeaconBroadcast.startAdvertisingBeaconWithString(uuid, identifier, major, minor)
})
.catch((e) => {
/* handle return errors */
- NOT_SUPPORTED_MIN_SDK
- NOT_SUPPORTED_BLE
- DEPRECATED_NOT_SUPPORTED_MULTIPLE_ADVERTISEMENTS
- NOT_SUPPORTED_CANNOT_GET_ADVERTISER
- NOT_SUPPORTED_CANNOT_GET_ADVERTISER_MULTIPLE_ADVERTISEMENTS
})
Non-exhaustive list of devices where BLE advertising is known to work. [Brackets] indicate variations besides the base model.