Skip to content

Instantly share code, notes, and snippets.

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/2f5148eb3ada0ed51beff693671fe7e2 to your computer and use it in GitHub Desktop.
Save qichuan/2f5148eb3ada0ed51beff693671fe7e2 to your computer and use it in GitHub Desktop.
android_location_request_background
// Request background permission
ActivityCompat.requestPermissions(
this@MainActivity,
arrayOf(Manifest.permission.ACCESS_BACKGROUND_LOCATION),
REQUEST_BACKGROUND_ONLY_PERMISSIONS_REQUEST_CODE
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment