Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing Android SDK 29 Deprecations #767

Open
phil-flyclops opened this issue Sep 26, 2019 · 5 comments
Open

Addressing Android SDK 29 Deprecations #767

phil-flyclops opened this issue Sep 26, 2019 · 5 comments

Comments

@phil-flyclops
Copy link

Android SDK 29 deprecated a series of filesystem access methods that leads to access permission errors even when a user grants permission to access system Storage.

Two of these are used by this library
https://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()
and
https://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory(java.lang.String)

They recommend using the following as an alternative
https://developer.android.com/reference/android/content/Context.html#getExternalFilesDir(java.lang.String)

I wanted to reach out to get guidance on if and how I could go about upgrading the library to be compliant as I'm more experienced as a React developer with somewhat minimal Android development experience

@DaddyRaegen
Copy link

Add the following line inside the tag of your manifest file.
android:requestLegacyExternalStorage="true"
(For those inexperienced, the path to the Manifest is $PATH_TO_PROJECT/android/app/src/main)

For reference, follow this link.

@phil-flyclops
Copy link
Author

Sweet, thanks for the heads up

@guofoo
Copy link

guofoo commented Apr 16, 2021

Does anyone have any updates on this issue?

I've tried adding the line to Manifest file but it still doesn't work.
<application android:requestLegacyExternalStorage="true" ... />

The referenced link above says the policy may not be respected due to policy or backwards compatibility reasons. So at least on my Redmi phone running Android 10, it is still not working.

@renielsalvador
Copy link

Any alternative solution for requestLegacyExternalStorage? Our app wont be approved if we keep having this in our AndroidManifest. Thanks

@guofoo
Copy link

guofoo commented May 15, 2021

Referencing all related issues to #998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants