Package selection guidance compiled from public package information, community data, and project usage.
The beacon_broadcast package enables Flutter applications to transform a device into a Bluetooth beacon using the AltBeacon library on Android and CoreLocation on iOS. It allows developers to broadcast custom beacon signals, making it useful for proximity-based interactions such as indoor navigation, location-triggered notifications, or asset tracking. The plugin is designed for cross-platform compatibility and integrates seamlessly with existing beacon ecosystems. It supports both foreground and background beacon transmission, ensuring consistent signal broadcasting across device states.
Use cases
Indoor navigation systems
Proximity marketing
Asset tracking in warehouses
Location-based app triggers
Smart home automation
Key features
Cross-platform support (Android & iOS)
Uses AltBeacon and CoreLocation frameworks
Customizable beacon UUID, major, and minor values
Background beacon broadcasting
Simple API for starting/stopping broadcasts
Suitable for
Developers building proximity apps
Apps requiring indoor positioning
Retail or enterprise location services
IoT and smart environment projects
Considerations
Requires Bluetooth permissions on both platforms
Battery usage may increase during continuous broadcasting
iOS background mode requires proper configuration
Beacon detection depends on nearby devices' scanning capabilities
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Beacon Broadcast plugin for Flutter
A Flutter plugin for turning your device into a beacon.
Usage
To use this plugin, add beacon_broadcast as a dependency in your pubspec.yaml
file and import:
You can also listen for changes in beacon advertising state:
beaconBroadcast.getAdvertisingStateChange().listen((isAdvertising) {
// Now you know if beacon is advertising
});
Before advertising, you may want to check if your device supports transmitting
as a beacon. You may do it using
checkTransmissionSupported() method.
BeaconStatus transmissionSupportStatus = await beaconBroadcast.checkTransmissionSupported();
switch (transmissionSupportStatus) {
caseBeaconStatus.SUPPORTED:
// You're good to go, you can advertise as a beaconbreak;
caseBeaconStatus.NOT_SUPPORTED_MIN_SDK:
// Your Android system version is too low (min. is 21)break;
caseBeaconStatus.NOT_SUPPORTED_BLE:
// Your device doesn't support BLEbreak;
caseBeaconStatus.NOT_SUPPORTED_CANNOT_GET_ADVERTISER:
// Either your chipset or driver is incompatiblebreak;
}
If you want to stop advertising, just call stop():
By default beacons layout is set according to the manufacturer
(see section Beacon manufacturers). You can change
that layout to imitate transmitting as a different kind of beacon.
Note: For iOS layout is set to iBeacon and can't be changed.
If you have your beacon layout set accordingly, you're allowed to transmit
some extra data. Depending on the layout it's usually up to 2 bytes.
For AltBeacon it's 1 byte of additional data (source).
For iBeacon (iOS) there's no option to send extra data, as the iBeacon layout
doesn't support it.
Android beacon will advertise as the AltBeacon manufactured by RadiusNetwork.
You can change it with setLayout() and setManufacturerId() methods.
iOS
For iOS, beacon will advertise as an iBeacon (by Apple), it can't be changed.
Transmitting in the background
Android
Due to background execution limits introduced in Android 8
beacons transmission in the background is limited. Based on the
AltBeacon documentation
it's around 10 minutes, after that time transmission will stop.
Current version of plugin doesn't support Foreground Services to exceed this
limitation.
iOS
For iOS, application doesn't work in the background. According to the
CoreLocation
documentation:
Important
After advertising your app as a beacon, your app must continue running in the
foreground to broadcast the needed Bluetooth signals. If the user quits the
app, the system stops advertising the device as a peripheral over Bluetooth.In addition, since iOS 13, a privacy usage description is required to use Bluetooth. Otherwise, the app will experience a runtime crash.
To remedy this, add the following lines to your Info.plist
<key>NSBluetoothAlwaysUsageDescription</key><string>(Reason bluetooth is used)</string>
For deployment targets earlier than iOS 13, add these additional lines to your Info.plist
<key>NSBluetoothPeripheralUsageDescription</key><string>(Reason bluetooth is used)</string>