flutteribeaconbeaconaltbeacon

Beacon functionality in Flutter


I'm currently building an app that turns my device into a Beacon while simultaneously scanning for other Beacons.

I've currently implemented 2 packages:

  1. flutter_beacon: https://pub.dev/packages/flutter_beacon
  2. beacon_broadcast: https://pub.dev/packages/beacon_broadcast

Everything is working as intended except that I'm broadcasting an AltBeacon and scanning for iBeacon, so my app can't recognize the signal I'm broadcasting.

Is there a package that either broadcasts iBeacon or monitors AltBeacon? Or maybe another way of achieving what I want to achieve? Any advice is greatly appreciated, as I'm stuck and out of ideas.


Solution

  • You can change beacon_broadcast to use iBeacon like this;

    beaconBroadcast
        .setUUID('39ED98FF-2900-441A-802F-9C398FC199D2')
        .setMajorId(1)
        .setMinorId(100)
        .setTransmissionPower(-59) //optional
        .setIdentifier('com.example.myDeviceRegion') //iOS-only, optional
        .setLayout('m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24') 
        .setManufacturerId(0x004C) 
        .start();
    

    The important changes above are the layout and manufacturer Id.