Page 1 of 1

Android paths for apps data files

Posted: Wed Apr 10, 2024 11:10 am
by cerebrumaggravated
Hi,

Im trying to port over a desktop app to Android (and iPhone when I get one), but have run into an early problem with data files.

My app creates and uses a few data files and a couple of databases. I setup the base path for these as a global and reference that throughout the app, but I can't figure out what the path should be for the mobile devices.

I can see there is a permission for external storage, do I need to set that as I'm not interested in sd cards etc, just storing a few preference files for my apps own internal workings.

Re: Android paths for apps data files

Posted: Wed Apr 10, 2024 12:24 pm
by Klaus
Hi cerebrumaggravated,

welcome to the forum!

On the mobile platform we have write permission here: specialfolderpath("documents")
So all user data need to go there!

Hint:
This is very different from the Docs folder on a desktop machine, on mobile it is a special folder
inside of the application package.

Best

Klaus