Skip to content

Commit

Permalink
remove write external storage permission only on android 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ivpusic committed Jul 19, 2021
1 parent 2437d99 commit f63a954
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ private void permissionsCheck(final Activity activity, final Promise promise, fi
List<String> missingPermissions = new ArrayList<>();
List<String> supportedPermissions = new ArrayList<>(requiredPermissions);

// we should not ask for WRITE_EXTERNAL_STORAGE when android on version with scoped storage
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
// android 11 introduced scoped storage, and WRITE_EXTERNAL_STORAGE no longer works there
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
supportedPermissions.remove(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}

Expand Down

0 comments on commit f63a954

Please sign in to comment.