WRITE_EXTERNAL_STORAGE pemission pop up not display after upgrading to tragetsk 33 and compile sdk 33 in kotlin. With same code, permission Pop up is showing in android 10 ph. But not showing in android 13 ph. the checking grant result for WRITE_EXTERNAL _STORAGE permission is -1 which is not granted.
Asked
Active
Viewed 203 times
1
-
1Check this : https://stackoverflow.com/q/72948052/18858169 – Bhavin Solanki Aug 30 '22 at 09:14
-
@BhavinSolanki , thanks for the suggestion. issue was resolved by using the READ_MEDIA_IMAGES permission instead of WRITE_EXTERNAL _STORAGE and READ_EXTERNAL _STORAGE – jerry Sep 12 '22 at 17:05
1 Answers
0
For android versions which less than API 29 (android 10)
you need to request WRITE_EXTERNAL_STORAGE
.
otherwise it's already granted because of ScopedStorage that released at android 11.
you can still use WRITE_EXTERNAL _STORAGE
in android 10 if you add requestLegacyStorage = true
to your manifest, but thats will not work for greater versions .
you should read about ScopedStorage: https://developer.android.com/about/versions/11/privacy/storage
and update your manifest to:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />

Bhavin Solanki
- 418
- 2
- 10

Mohmmaed-Amleh
- 383
- 2
- 11
-
Thanks for the guidance. my issue was resolved by using the READ_MEDIA_IMAGES permission instead of WRITE_EXTERNAL _STORAGE and READ_EXTERNAL _STORAGE . credit to : stackoverflow.com/q/72948052/18858169 – jerry Sep 12 '22 at 17:08