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

How can I handle Bluetooth permissions in android? #5

Open
chinzorigts opened this issue Feb 14, 2022 · 1 comment
Open

How can I handle Bluetooth permissions in android? #5

chinzorigts opened this issue Feb 14, 2022 · 1 comment

Comments

@chinzorigts
Copy link

Please help me?

I can't use PermissionsGroups in perms. How can i use?

@arcticfox1919
Copy link
Owner

@chinzorigts
Bluetooth permissions do not need to be actively requested, maybe you can look here.

You just need to configure in AndroidManifest.xml:

<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

Android is weird, on some phones you may need location permissions in order to use bluetooth. If just doing the above configuration doesn't work, then you may need to configure location permissions:

<uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION"/>

This is a dangerous permission, so next you need to actively request it

FlutterEasyPermission.request(
                    perms:[Permissions.ACCESS_COARSE_LOCATION],rationale:"Test permission");

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

2 participants