Package selection guidance compiled from public package information, community data, and project usage.
The beacons_plugin simplifies iBeacon scanning and ranging in Flutter applications for both Android and iOS. It enables developers to detect nearby iBeacons and receive real-time proximity updates, such as immediate, near, or far. The plugin integrates seamlessly with native Bluetooth capabilities, providing a straightforward API to monitor beacon signals without complex setup. Ideal for location-based services, indoor navigation, and context-aware apps.
Use cases
Indoor navigation systems
Proximity-based notifications
Retail customer engagement
Asset tracking
Context-aware mobile experiences
Key features
Real-time beacon scanning
Proximity detection (immediate, near, far)
Cross-platform support (Android & iOS)
Simple integration with Flutter
Background monitoring capability
Suitable for
Developers building location-aware apps
Retail and hospitality apps
Smart office and campus solutions
Event-based notification systems
Indoor positioning projects
Considerations
Requires Bluetooth permissions on both platforms
Limited to iBeacon protocol
Background scanning may impact battery life
iOS requires background mode configuration
Accuracy depends on environmental factors
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
beacons_plugin
This plugin is developed to scan nearby iBeacons on both Android iOS. This library makes it easier to scan & range nearby BLE beacons and read their proximity values.
Android
For Android change min SDK version:
defaultConfig {
...
minSdkVersion 19
...
}
Change your Android Project's MainActivity class to following:
import com.umair.beacons_plugin.BeaconsPlugin
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity(){
override fun onPause() {
super.onPause()
//Start Background service to scan BLE devices
BeaconsPlugin.startBackgroundService(this)
}
override fun onResume() {
super.onResume()
//Stop Background service, app is in foreground
BeaconsPlugin.stopBackgroundService(this)
}
}
That's it for Android.
iOS
In your AppDelegate.swift file change it to like this:
// if you need to monitor also major and minor use the original version and not this forkBeaconsPlugin.addRegion("myBeacon", "01022022-f88f-0000-00ae-9605fd9bb620")
.then((result) {
print(result);
});
//Send 'true' to run in background [OPTIONAL]awaitBeaconsPlugin.runInBackground(true);
//IMPORTANT: Start monitoring once scanner is setup & ready (only for Android)if (Platform.isAndroid) {
BeaconsPlugin.channel.setMethodCallHandler((call) async {
if (call.method == 'scannerReady') {
awaitBeaconsPlugin.startMonitoring();
}
});
} elseif (Platform.isIOS) {
awaitBeaconsPlugin.startMonitoring();
}
if (Platform.isAndroid) {
//Prominent disclosureawaitBeaconsPlugin.setDisclosureDialogMessage(
title: "Need Location Permission",
message: "This app collects location data to work with beacons.");
//Only in case, you want the dialog to be shown again. By Default, dialog will never be shown if permissions are granted.awaitBeaconsPlugin.clearDisclosureDialogShowFlag(false);
}
BeaconsPlugin.channel.setMethodCallHandler((call) async {
if (call.method == 'isPermissionDialogShown') {
//Do something here
}
});