Liu Tom
Liu Tom

Reputation: 397

preserveLegacyExternalStorage="true" not working for upgrade

I recently upgraded the target SDK to 30 (the current version is 28). In order to migrate data, I configured preserveLegacyExternalStorage="true" in the AndroidManifest. I hope to migrate files from external storage to internal storage. However, on many devices where I perform an overlay installation of the application, I still encounter exceptions related to reading and writing external storage. The return value of Environment.isExternalStorageLegacy() is also false. Can you help identify the issue?

The android os version of the test device is Android R.

AndroidManifest.xml config:

 <application
...
android:requestLegacyExternalStorage="true"
android:preserveLegacyExternalStorage="true"
...

Upvotes: 0

Views: 110

Answers (0)

Related Questions