HBiSoft / PickiT

An Android library that returns real paths from Uri's

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scoped Storage warning messages

Mouadabdelghafouraitali opened this issue · comments

Not an issue or bug, but just a question regarding the new Google Play policy,

We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of 1 or more of your app bundles or APKs.

Developers with apps on devices running Android 11+ must use Scoped Storage to give users better access control over their device storage. To release your app on Android 11 or newer after May 5th, you must either:

Update your app to use more privacy friendly best practices, such as the Storage Access Framework or Media Store API Update your app to declare the All files access (MANAGE_EXTERNAL_STORAGE) permission in the manifest file, and complete the All files access permission declaration in Play Console from May 5th Remove the All files access permission from your app entirely For apps targeting Android 11, the requestLegacyExternalStorage flag will be ignored. You must use the All files access permission to retain broad access.

SOURCE : https://support.google.com/googleplay/android-developer/answer/10467955?hl=en&ref_topic=2364761

My app :

targetSDK = 30
requestLegacyExternalStorage  = true

Permissions :

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

What happend with this? I ask because you can not relelase app with requestLegacyExternalStorage and android targeet 30

@kneza23
because you can not relelase app with requestLegacyExternalStorage and android targeet 30
Yes you can. I'm not sure where you read this but it's not true.

Starting with Android R, this attribute requestLegacyExternalStorage will be ignored. requestLegacyExternalStorage is only for Android 10, where file access was removed and it returned with the release of Android 11(R).

When targeting Android 11 > you still have to keep requestLegacyExternalStorage for reading files directly on Android 10.

This library doesn't use MANAGE_EXTERNAL_STORAGE, which Google is referring to in the issue/question. As stated in my previous comment, requestLegacyExternalStorage will be ignored on Android 11>, but it's still necessary for reading files on Android 10.

yeah i was wrong :) i have read it now carefully