I've been using react-native-ble-advertiser to try and send string data (the broadcast uuid) between phones, I've managed to get these sharing compatabilities
- iOS to iOS 2-way
- Android to Android 2-way
- Android to iOS 1-way
I'm wondering if perhaps I missed something for BLE as when I try to advertise on iOS I get the warning The advertisement key 'Manufacturer Data' is not allowed in CoreBluetooth however as I said I can detect iOS to iOS.
Is there any way to detect iOS on Android?
Below is my configuration taken from the example on the github link above.
The scanning and broadcasting is done at the same time, though I tested without this and still had the issue.
const MANUF_DATA = [1, 0];
BLEAdvertiser.setCompanyId(0x4C);
BLEAdvertiser.broadcast(hash_uuid, MANUF_DATA, {
advertiseMode: BLEAdvertiser.ADVERTISE_MODE_BALANCED,
txPowerLevel: BLEAdvertiser.ADVERTISE_TX_POWER_MEDIUM,
...
})
BLEAdvertiser.scan(MANUF_DATA, {
scanMode: BLEAdvertiser.SCAN_MODE_LOW_LATENCY,
})
Does anyone have experience with this package or know of a better way to transmit a string? Open to posting the native code from the package.
Thanks.