Closed barangungor closed 2 years ago
@barangungor Let me look into this issue today.
@umair13adil Thanks waiting for it.
This issue is resolved in version 2.0.5.
I upgraded to 2.0.5 but still same error.
@barangungor Have you tried it in the sample app, after pulling latest changes?
@umair13adil No, i didn't try sample app but my code same with sample app
final StreamController<String> beaconEventsController =
StreamController<String>.broadcast();
if (Platform.isAndroid) {
BeaconsPlugin.channel.setMethodCallHandler((call) async {
if (call.method == 'scannerReady') {
await BeaconsPlugin.startMonitoring();
}
});
} else if (Platform.isIOS) {
await BeaconsPlugin.startMonitoring();
}
await BeaconsPlugin.listenToBeacons(beaconEventsController);
await BeaconsPlugin.addRegion(
"iBeacon", "4aa10000-0a46-115f-d97e-5a966a7ddcc4");
print("Beacons DataReceived: " + BeaconsPlugin.channel.toString());
beaconEventsController.stream.listen(
(data) {
if (data.isNotEmpty) {
print("Beacons DataReceived: " + data);
}
},
onDone: () {},
onError: (error) {
print("Error: $error");
});
await BeaconsPlugin.startMonitoring();
We definitely need to use this code. I added this block and error fixed. Thanks @umair13adil !
if (Platform.isAndroid) {
//Prominent disclosure
await BeaconsPlugin.setDisclosureDialogMessage(
title: "Background Locations",
message:
"[This app] collects location data to enable [feature], [feature], & [feature] even when the app is closed or not in use");
//Only in case, you want the dialog to be shown again. By Default, dialog will never be shown if permissions are granted.
//await BeaconsPlugin.clearDisclosureDialogShowFlag(false);
}
I'm facing this issue again. I can't understand, Sometimes it happens sometimes it doesn't.
This issue appears to have come back! We get past the prominent disclosure, but that's it. Scanning is never started! This used to work in 2.0.0. I've upgraded to 2.0.8 (clean and rebuild) - and it is no longer working! Tested on fully updated Pixel 4.
I want scan beacon devices, wrote the code like example code but i only see 2. print in my console. I can't see 3. print and can't startMonitoring.