79203910

Date: 2024-11-19 14:59:22
Score: 3
Natty:
Report link

@TargetApi(23) void solicitarPermisos(){ if (ContextCompat.checkSelfPermission(this,permiso) != PackageManager.PERMISSION_GRANTED) { // Should we show an explanation? if (shouldShowRequestPermissionRationale( Manifest.permission.READ_EXTERNAL_STORAGE)) { // Explain to the user why we need to read the contacts } requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1); // MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE is an // app-defined int constant that should be quite unique return; } }

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: Epic LL