INNER CODE UNIT · Java
onClick
prscX/react-native-photo-editor · android/src/main/java/com/ahmedadeltito/photoeditor/BaseActivity.java:81
public void onClick(DialogInterface dialogInterface, int i) {
if (caller == 1) {
ActivityCompat.requestPermissions(BaseActivity.this,
new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},
MY_PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE_CAMERA);
} else {
ActivityCompat.requestPermissions(BaseActivity.this,
new String[]{android.Manifest.permission.WRITE_EXTERNAL_STORAGE},
MY_PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE_GALLERY);
}
}
});
builder.setNegativeButton(getString(R.string.not_now), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(BaseActivity.this, getString(R.string.media_access_denied_msg), Toast.LENGTH_SHORT).show();
}
});