Open wieger opened 1 year ago
@wieger did you find a solution? I'm facing the same issue. Thank you in advance
Unfortunately not, it must be something silly in the configuration. but after spending too much time on it I finally gave up on it. If you do get it to work please post it here!
Regards Wieger
On Wed, Jul 31, 2024 at 2:23 PM Dalila Ben Nasr @.***> wrote:
@wieger https://github.com/wieger did you find a solution? I'm facing the same issue. Thank you in advance
— Reply to this email directly, view it on GitHub https://github.com/alann-maulana/flutter_beacon/issues/131#issuecomment-2260397677, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZGMJSPEUYG35A3IE52HDZPDJNBAVCNFSM6AAAAABLYLSAQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGM4TONRXG4 . You are receiving this because you were mentioned.Message ID: @.***>
@wieger do you remember what flutter sdk you were using?
My pubspec.lock for the project says:
sdks: dart: ">=3.2.3 <4.0.0" flutter: ">=3.16.6"
On Wed, Jul 31, 2024 at 2:31 PM Dalila Ben Nasr @.***> wrote:
@wieger https://github.com/wieger do you remember what flutter sdk you were using?
— Reply to this email directly, view it on GitHub https://github.com/alann-maulana/flutter_beacon/issues/131#issuecomment-2260413537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZGMNLVG62M7ITKHA6CJTZPDKLFAVCNFSM6AAAAABLYLSAQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGQYTGNJTG4 . You are receiving this because you were mentioned.Message ID: @.***>
is the project in a git repo? is it public?
Its not public i'm afraid
On Wed, Jul 31, 2024 at 2:39 PM Dalila Ben Nasr @.***> wrote:
is the project in a git repo? is it public?
— Reply to this email directly, view it on GitHub https://github.com/alann-maulana/flutter_beacon/issues/131#issuecomment-2260427115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACZGMLVV3QSGF7NP4NEH5TZPDLHLAVCNFSM6AAAAABLYLSAQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGQZDOMJRGU . You are receiving this because you were mentioned.Message ID: @.***>
Currently I'm using Galaxy S22 with One UI 4.1 (Android 12) for test and it works for now. I think you might missed the request for location permission. Here's what I'm using for permission acquirement, hope it works for you too:
import 'package:permission_handler/permission_handler.dart';
import 'package:device_info_plus/device_info_plus.dart';
Future<void> _requestPermissions() async {
var androidInfo = await DeviceInfoPlugin().androidInfo;
var androidSdk = androidInfo.version.sdkInt;
final locationStatus = await Permission.location.request();
if (locationStatus.isPermanentlyDenied) {
openAppSettings();
}
if (androidSdk <= 30) {
final bluetoothStatus = await Permission.bluetooth.request();
if (bluetoothStatus.isPermanentlyDenied) {
openAppSettings();
}
return;
} else /* if (androidSdk > 30) */ {
Map<Permission, PermissionStatus> statuses = await [
Permission.bluetoothScan,
Permission.bluetoothAdvertise,
Permission.bluetoothConnect
].request();
if (statuses[Permission.bluetoothScan] == PermissionStatus.denied ||
statuses[Permission.bluetoothAdvertise] == PermissionStatus.denied ||
statuses[Permission.bluetoothConnect] == PermissionStatus.denied) {
openAppSettings();
}
return;
}
}
Hi, I have build an app to scan for beacons using this package. It all works flawlessly on iOS devices but I cannot get it to work on my Android device, a samsung S10 running android 12. I hope that someone which has managed to get it working can help me debug it, or point me towards a step I missed during the setup. To debug it I am now running the example code provided in the repository At first I was missing the proper permissions but I think I have that sorted, combining some previous posts on this forum.
I have the following permissions in main/AndroidManifest.xml
I request the required permissions with the following code, and all statuses resolve to granted
I listen for beacons using:
_streamRanging = flutterBeacon.ranging(regions).listen((RangingResult result) { print(result);
this does print a result but it contains no beacons:
Any help is greatly appreciated, thanks