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

Viewed 911

Google Play says.

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

Blockquote 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:

Blockquote - 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

Blockquote For apps targeting Android 11, the requestLegacyExternalStorage flag will be ignored. You must use the All files access permission to retain broad access.

Blockquote 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.

And my package.json file is the following.

 {
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo/vector-icons": "^12.0.2",
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/drawer": "^5.11.4",
    "@react-navigation/native": "^5.8.10",
    "@react-navigation/stack": "^5.12.8",
    "expo": "~40.0.0",
    "expo-status-bar": "~1.0.3",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "0.63.4",
    "react-native-base64": "^0.2.1",
    "react-native-gesture-handler": "^1.9.0",
    "react-native-maps": "0.27.1",
    "react-native-reanimated": "^1.13.2",
    "react-native-safe-area-context": "^3.1.9",
    "react-native-screens": "^2.16.1",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-web": "~0.13.12",
    "react-navigation": "^4.4.3",
    "react-navigation-drawer": "^2.6.0",
    "react-navigation-stack": "^2.10.2",
    "react-redux": "^7.2.2",
    "redux": "^4.0.5",
    "expo-notifications": "~0.8.2",
    "expo-permissions": "~10.0.0"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0"
  },
  "private": true
}

How can I solve this problem?

1 Answers

@Tobias shared this. https://github.com/expo/expo/issues/12603

SDK 41 contains all the necessary changes to make your app compatible with Android 11, and should not result in removal from the Play Store. There is no action for you to take. Just because you received this warning, does not mean your app is infringing on the new scoped storage policy. According to this response from someone at Google, they sent this warning to anyone using the requestLegacyExternalStorage flag since it is their best indicator of apps that may need to declare the MANAGE_EXTERNAL_STORAGE permission. No Expo libraries require the MANAGE_EXTERNAL_STORAGE permission.

If you're on SDK 41- you have nothing to do, you can ignore this warning. If you're on SDK 40 or below- you can ignore this warning since it's specific to targeting Android 11. Bare workflow- update to the most recent version of expo-image-picker, and make sure none of your other dependencies require the MANAGE_EXTERNAL_STORAGE permission (inspect your AndroidManifest.xml from a release APK).

Related