openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
749 stars 359 forks source link

Android Preserve External Storage for Android 10+ #1793

Closed mcagabe19 closed 1 month ago

mcagabe19 commented 1 month ago

See https://developer.android.com/training/data-storage/use-cases#opt-out-scoped-storage and https://developer.android.com/training/data-storage/use-cases#migrate-legacy-storage for more info.

player-03 commented 1 month ago

By default, OpenFL and Lime save data in the folder returned by getFilesDir(). As far as I can tell from the documentation, this folder will remain accessible.

If you've stored data in other folders and you need these settings to make sure you can access that data, you can enable them from project.xml:

<config:android>
    <application android:requestLegacyExternalStorage="true" android:preserveLegacyExternalStorage="true" />
</config:android>

I might be missing something, but I don't see why these would need to be built in to Lime.

mcagabe19 commented 1 month ago

Oh, I didn't know sorry closing up this rn

player-03 commented 1 month ago

No problem. This is still an undocumented feature for now, so you'd have to have been paying very close attention to the PRs to be aware of it.

We'll release proper documentation once Lime 8.2.0 comes out.