pszklarska / beacon_broadcast

A Flutter plugin for turning your device into a beacon.
https://pub.dartlang.org/packages/beacon_broadcast/
MIT License
81 stars 33 forks source link

Eddystone layouts broadcast. #27

Closed theasifiqbal closed 2 years ago

theasifiqbal commented 3 years ago
BeaconBroadcast()
.setUUID('0000feaa-0000-1000-8000-00805f9b34fb')
.setMajorId(1)
.setMinorId(100)
.setTransmissionPower(-59) //optional
.setAdvertiseMode(AdvertiseMode.lowPower) //Android-only, optional
.setLayout(BeaconBroadcast.ALTBEACON_LAYOUT)
.setManufacturerId(0x00E0) //Android-only, optional
.start();

When i try to broadcast eddystone url by setting layout _EDDYSTONE_URLLAYOUT app produces error PlatformException (PlatformException(error, Beacon has 3 identifiers but format requires 2, null))

While I have tried by unsetting MinorId then library throws exception of casting null to int not allowed.

Any solution/suggestion will be appreciated. Thanks.

pszklarska commented 2 years ago

Hey @theasifiqbal that should be fixed in the newest version (0.3.0):

BeaconBroadcast()
  .setUUID('0000feaa-0000-1000-8000-00805f9b34fb')
  .setMajorId(1)
  .setLayout(BeaconBroadcast.EDDYSTONE_UID_LAYOUT)
  .start();

I'm closing this issue, feel free to re-open if you still notice that.