Skip to content

Instantly share code, notes, and snippets.

@qichuan
Last active July 14, 2021 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qichuan/aeaf1eff30454f84ec46b47e24ae7bf3 to your computer and use it in GitHub Desktop.
Save qichuan/aeaf1eff30454f84ec46b47e24ae7bf3 to your computer and use it in GitHub Desktop.
android_location_request_foreground
// Request permission
ActivityCompat.requestPermissions(
this@MainActivity,
arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),
REQUEST_FOREGROUND_ONLY_PERMISSIONS_REQUEST_CODE
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment