I have a problem when running my app on Android OS 4.0 and requesting READ_EXTERNAL_STORAGE
permission with:
ActivityCompat.requestPermissions(ctx, requestedPermissions, requestCode);
I always get on the callback
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
grantResults != PackageManager.PERMISSION_GRANTED
Checking the permission with ActivityCompat.checkSelfPermission
is always returning permissionDenied
.
It works well on OS 6.0 by requesting the permission with system dialog.
Android OS 4.x excepted the 4.0 the permission is always granted.
OS 4.0 the other permissions (Camera,Calendar,Contact,Phone) are behaving well except the READ_EXTERNAL_STORAGE
causing this issue.
Maybe an OS issue?