Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 3, 2021 01:24
Embed
What would you like to do?
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