Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 3, 2021 01:24
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 parzibyte/90cc8b7ce2a61528d5936a4e3c3eb805 to your computer and use it in GitHub Desktop.
Save parzibyte/90cc8b7ce2a61528d5936a4e3c3eb805 to your computer and use it in GitHub Desktop.
override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<out String>,
grantResults: IntArray
) {
if (requestCode == CODIGO_PERMISOS_UBICACION_SEGUNDO_PLANO) {
val todosLosPermisosConcedidos =
grantResults.all { it == PackageManager.PERMISSION_GRANTED }
if (grantResults.isNotEmpty() && todosLosPermisosConcedidos) {
haConcedidoPermisos = true;
//El usuario concedió todos los permisos
} else {
// Uno o más permisos fueron denegados
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment