Last active
September 7, 2020 06:06
-
-
Save fredchung/b07d2bec79a55c4e9cca18dd149bc829 to your computer and use it in GitHub Desktop.
Do not request foreground and background location permissions together (ActivityCompat or Framework APIs)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requestPermissions( | |
arrayOf( | |
// Do not request foreground and background location permissions together, | |
// as they will be ignored along with any other permissions in the request. | |
// Request location permissions incrementally instead. | |
android.Manifest.permission.ACCESS_COARSE_LOCATION, | |
android.Manifest.permission.ACCESS_BACKGROUND_LOCATION, | |
...) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment