Skip to content

Commit

Permalink
Merge pull request #51 from SergKhram/feature/fix-request-external-st…
Browse files Browse the repository at this point in the history
…orage

Fixed the external storage requester for android api version above 28
  • Loading branch information
viclovsky authored Mar 1, 2021
2 parents 9f678c0 + 28b285d commit ccbc556
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal fun isDeviceTest(): Boolean =
System.getProperty("java.runtime.name")?.toLowerCase()?.contains("android") ?: false

internal fun requestExternalStoragePermissions() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M || Build.VERSION.SDK_INT > Build.VERSION_CODES.P ) return

with(PermissionRequester()) {
addPermissions("android.permission.WRITE_EXTERNAL_STORAGE")
Expand Down

0 comments on commit ccbc556

Please sign in to comment.