-
Notifications
You must be signed in to change notification settings - Fork 485
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
SDK 31 Android 12 Solution #7
Comments
This solution didn't fully fix my problem because it didn't find any Eddystone beacons, so after long research I found this solution. It fixed my problem. Of course, I also followed and implemented peekpt solution. |
@peekpt what about this PR ? It seem to fix Android 12 for me and best of all it does not rely on permission_handler plugin which requires some version-specific code for Android (i.e. different permissions between android versions). If @espresso3389 don't have time to submit it here, I can try to do so if he is okay with it |
Permission handler is not accepting the Bluetooth scan and bluetoothConnect permission even with the latest packages. |
Since SDK 31 is required now:
( this was my solution to get it working on Android 12 and older devices. I'm open for suggestions.)
1. Go to Android Studio delete all other SDK and select to Install SDK31
(also upgrade Kotlin to 1.6.10 and all other things that it needs to upgrade)
check if you have installed sdk 31 with
flutter doctor
command in the terminal2. Create a
proguard-rules.pro
file in android/app/save it with this code:
3. Modify these gradle files:
android/app/build.gradle
(don't forget to change bundle name to yours)
android/build.gradle
android/gradle/wrapper/gradle-wrapper.properties
4. Install permission_handler plugin from pub.dev
5. add this to your main function before runApp() or wherever you want to call for permissions.
6. Add permissions to your android/app/src/main/AndroidManifest.xml
The text was updated successfully, but these errors were encountered: