Search code examples
javaandroidgoogle-playandroid-permissionsgoogle-play-console

Requestlegacyexternalstorage permission in Manifest - Google Play Console 5 May Message


I got message from Google in my Developer Console.

Starting 5 May, you must let us know why your app requires broad storage access

We've detected that your app contains the requestLegacyExternalStorage flag in the manifest file of one 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 5 May, 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 5 May
  • 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. Apps requesting access to the All files access permission without a permitted use will be removed from Google Play, and you won't be able to publish updates.

What should we do to comply this policy? What happens if we do not make any modification in our APK?

TargetSDK of my app is 29. Is this not a problem? Will my app be removed from Google Play if I do not make any modification?

What does Google say?

a) "No problem if your app target 29 or lower. Yo do not have to make any modification, you can continue using requestlegacyexternalstorage. For us it is important that if your app target 30(Android 11). If your app target 29 or lower, your app will be live even if you do not make any changes in your manifest but if you want to target 30, you must remove it(and use other methods to get user permission)"

b) "Even if your app target 29 or lower, you must change your manifest. Remove requestLegacyExternalStorage from manifest, otherwise we will remove your app from Google Play."

Which one is correct? What does Google say? a or b?

If b is correct what should I do? I am using this permission for images in gallery not for all files.


Solution

  • To make it as clear as possible, if you are aiming at API 29 for target sdk version, you don’t need to do anything for now, but you will have to do it for August - November which is the deadline to change this permissions in your app as it will be also mandatory to aim for SDK 30, for now keep requestLegacyExternalStorageflag = true in your Manifest file, if you don’t want to change the sdk and the storage permissions immediately.

    Hard deadline is August - November for all apps because then it’s mandatory that all apps have targetSDK = 30, and in relation to this, there was a change in the privacy policy on Android SDK 30 that makes changing this permission obligatory, that’s why it’s only a warning for now. But nothing will happen to your app now if you don’t do anything, until August - November.