Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28474

Android: Modify requestLocationPermissions() to also request ACCESS_COARSE_LOCATION

    Details

      Description

      Summary:
      Currently, our Ti.Geolocation.hasLocationPermissions() and Ti.Geolocation.requestLocationPermissions() methods only check/request for the ACCESS_FINE_LOCATION permission. We should change these APIs to also check/request for ACCESS_COURSE_LOCATION as well.

      Reason:
      As of Android 12, the location permission dialog will ask the end-user for "Precise" or "Approximate" location precision as shown in the below screenshot.
      https://developer.android.com/about/versions/12/approximate-location

      If we only request for ACCESS_FINE_LOCATION, then the following error will be logged and the permission request will fail.

      ACCESS_FINE_LOCATION must be requested with ACCESS_COARSE_LOCATION
      

      To-Do:
      Update location permission handling in...

      Note:
      This only impacts apps which "target" Android 12 (aka: API Level 31).

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Joshua Quick
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration