Hello.
I want to save user data in private folder on Android. I need it because user save data have information about user balance, lives, etc, which must not be available for user to edit in easy way.
All the tutorials that I read offer the same thing: save data in Application.persistentDataPath. But this path is refers to public folder:
In Android documentation Omówienie danych i miejsca na pliki | Android Developers
External storage:
- It’s not always available, because the user can mount the external storage as USB storage and in some cases remove it from the device.
- It’s world-readable, so files saved here may be read outside of your control.
So, obviously it’s not a good choice for saving valuable private user data.
What I’m need - it’s internal storage.
Internal storage:
- It’s always available.
- Files saved here are accessible by only your app.
My questions is:
- Do Unity have property for get path which resolved using android.content.Context.getFilesDir()?
- If not, which path I should use for my purpose?