Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Location permission denied

    Developers
    2
    3
    109
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bmatest0910
      bmatest0910 last edited by bmatest0910

      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 1 Reply Last reply Reply Quote 0
      • bmatest0910
        bmatest0910 @Emil last edited by

        @Emil That fixes the issue. Thanks!

        1 Reply Last reply Reply Quote 0
        • Emil
          Emil FlicTeam @bmatest0910 last edited by

          @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.

          bmatest0910 1 Reply Last reply Reply Quote 0
          • First post
            Last post