request and set permissions on Android for location / GPS

How do you request and set permissions for location/GPS services on Android to comply with the Google Play policy to take effect on March 29, 2021?

It would be great if the sample GPS project was updated to show how to request and set permissions for location.

I believe you are referring to this email from Google :

Hello Google Play Developer,
Last February, we announced privacy updates to our Location Permissions policy that will limit which apps are allowed to use background location data. This policy will impact one or more of your apps, listed at the end of this email.
To help prevent unnecessary access to background location, the policy will allow access only if it’s critical to the app’s core functionality and provides clear user benefit. We found that many apps that requested background location don’t actually need it. Removing or changing it to foreground can help apps be battery-efficient and avoid poor app ratings when users don’t want to share their location.
Issue with your apps
We found that at least one of your apps may be requesting background location data. If your app uses background location data, you must remove access to location in the background or get approval for the requests by March 29, 2021 so your app can stay on Google Play.
Action may be required: Submit your apps for review and approval by March 29, 2021

  1. Read and follow the checklist in the Help Center
  2. Make any necessary changes to your app to comply with this policy.
  3. Double check that your app is compliant with all other Developer Program Policies.
  4. Sign in to your Play Console to submit your app and Location permissions declaration form for approval.
    If your apps aren’t eligible to access location in the background or don’t meet requirements for accessing location in the background, please remove the permission from your manifest and in-app functionality.
    Tips for getting approval
    • If your app has multiple features that use background location, choose the one that provides the most user benefit. Describe in detail why background (and not foreground) location is needed and how it is used. Learn more
    • You must include a short video that shows how users will encounter your location-based feature and enable it in-app. If your video doesn’t show this or we can’t access the link, your request won’t be approved. We recommend that you upload it to YouTube or Google Drive.
    • Remember to include a prominent in-app disclosure to explain to users what data is used and how. Learn more
    • Ensure your privacy policy is clearly labeled and includes details on location data usage. Learn more
    We want to help you through this process, so we’ve created this video and quick training courses in Google Play Academy to use as a reference when you’re making any necessary app updates. You can also check out these best privacy practices and technical details to help identify possible background location usage in your code.

@yosu
That is correct.

I also assume there are other permissions besides “Location” that will need to be requested and set.

See https://docs.coronalabs.com/api/library/native/showPopup.html#requestAppPermission

@Scott_Harrison Thanks for the link.

When I test the Camera example project that uses the “requestAppPermission” for Android it does not prompt me to give it Permission and automatically allows me to use the Camera. I am testing on a device running Android 4.4.2. Is this a bug or does it only work on newer Android OS’s and if so which ones?

Only workings on new versions, I am not an Android guy I think it is Android 7, I don’t remember off the top of my head