Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not scan bluetooth in android api 29 and 30 #16

Open
andresperezmelo opened this issue Sep 25, 2020 · 3 comments
Open

Does not scan bluetooth in android api 29 and 30 #16

andresperezmelo opened this issue Sep 25, 2020 · 3 comments

Comments

@andresperezmelo
Copy link

The module is not able to scan bluetooth when compiling a project in targetSdkVersion 30 0 29 and compileSdkVersion 30 or 29

Works fine in api 28 or lower

Let's wait if the developer updates the package.

The problem

When compiled in api 29 or 30 the application is not able to request permanent location permission, only two options of

permission denied
allow only with the app in use

And it turns out that the permission of only the app in use, your module is unable to scan bluetooth

Api 28 permission
api 28
Api 28 app
Api 28 buscar

Api 30 o 29 permission
api 30

Doesn't scan in the app
api 30 buscar

Let's hope they update it soon, if anyone knows of a similar package that works please let us know

Att: Andres Perez

@mametjunior212
Copy link

me too

@andresperezmelo
Copy link
Author

and created this for Android https://pub.dev/packages/print_bluetooth_thermal

@ossgoossgo
Copy link

I fix my project with android9. to android10 can not search bluetooth problem.
All problems occur because android10 add new permission with bluetooth.
Try to use this package
permission_handler: ^5.0.1+1
https://pub.dev/packages/permission_handler

Before you call search bluetooth add these code
Map<Permission, PermissionStatus> statuses = await [
Permission.location,
Permission.locationWhenInUse,
].request();
print(statuses[Permission.location]);
print(statuses[Permission.locationWhenInUse]);

Then call search ... It's work

Hope it can helps you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants