Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 11, 2019 03:01
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/a1f0a48130f0c286ad20499798e6d603 to your computer and use it in GitHub Desktop.
Save parzibyte/a1f0a48130f0c286ad20499798e6d603 to your computer and use it in GitHub Desktop.
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
switch (requestCode) {
case CODIGO_PERMISOS_CAMARA:
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
permisoDeCamaraConcedido();
} else {
permisoDeCamaraDenegado();
}
break;
// Aquí más casos dependiendo de los permisos
// case OTRO_CODIGO_DE_PERMISOS...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment