where is the user:// folder located in android?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By zen3001

or even the res:// folder, I just can’t find it.

There is a method for getting this called OS.get_user_data_dir.
You can check it here.

Mxt08 | 2021-04-08 08:54

:bust_in_silhouette: Reply From: Wakatta

I had this thought also but because I know the way Android filesystem is structured it can only be 2 possible locations.

/SD card/Android/my.app.name/files

But because Godot devs drop hints to liking privacy. I’d say option one is the best bet which would do you no good if you intend to access that folder.
It’s locked to the application so only that application or a rooted phone can modify those contents

well I implemented a system that allows the game to load custom pictures, wouldn’t that work either?
either way the only folder I can find with app files is “Android/data” but there’s no folder there, related to my app.

zen3001 | 2021-04-08 12:36

Yes your app should work no problem the trouble comes when you wanna access those images otherwise.

I’m not entirely sure if Godot has a better way but you can access the SD card using OS.get_environment("EXTERNAL_SDCARD_STORAGE") or OS.get_environment("EXTERNAL_STORAGE") to output those files

Wakatta | 2021-04-08 16:02

I want to access those images, the hell else would I want with them?
are there any other environment variables?

zen3001 | 2021-04-08 16:15

just to make it clearer, I want to be able to create custom images in my mobile and put them in the game folder and have the game load them

zen3001 | 2021-04-08 16:18