Location permission denied
-
Hi all,
I am having a hard time to get the Flic2 SDK working in my Android app due to permission issue.
I just add the following line in my build.gradle with no other changes:implementation 'com.github.50ButtonsEach:flic2lib-android:1.+'
But, ACCESS_FINE_LOCATION permission is denied even if user allowed it in permission dialog.
If I remove that line from build.gradle, permission is granted after user allowed it.Is there any other version that works with permission?
Thank you.
-
@Emil That fixes the issue. Thanks!
-
@bmatest0910 You need to carefully study the readme at https://github.com/50ButtonsEach/flic2lib-android, in particular the section https://github.com/50ButtonsEach/flic2lib-android?tab=readme-ov-file#scanning-for-new-buttons. What API level does your app target and what Android version does your device have?
If targeting and running on Android 12 or higher, ACCESS_FINE_LOCATION is not the permission that you should request at runtime, but BLUETOOTH_SCAN and BLUETOOTH_CONNECT.
If you really need ACCESS_FINE_LOCATION in your app for your other purposes, not Flic-related, such as GPS, you need to follow the instructions at https://github.com/50ButtonsEach/flic2lib-android?tab=readme-ov-file#api-versioning-and-manifest-permissions.