Hello Goders, I want to make the com.android.namegame folder appear in android. Every application has a file folder inside the android/data/ folder, how do I make my android app also have one and be able to access it? I have an android game, and I need to create a txt file, but save it in its com.android folder.
How to create unique name for android?
- Edited
The folder name is specified in Project >> Export... >> Android >> Options >> Package >> Unique Name I have that set to the default: org.godotengine.$genname $genname gets replaced by the Project Name. When you save a file to "user://", for example "user://my_file.txt", it's placed in that folder under the "files" subfolder.
But it wasn't created, I can't find it.
- Edited
How are you trying to find it? Do you mean that you can't open/read it in your Godot app?
When creating my apk and installing it on my phone, inside the files in the Android/data/ folder I can't find the com.godotengine.name folder for my app.
- Edited
You still haven't said how you're trying to find the folder.
From the Linux shell on my desktop computer, with a USB cable connected to my Android phone, I can use adb to access my app's files:
adb shell
cd /data
run-as org.godotengine.myappname
ls
- Edited
Android Studio's Device File Explorer also shows the folder and its contents.
You can create and save/load files on Android, I don't believe you need to know the directory. You should still customize the path in the export settings, that way your game has a unique folder, but you don't need to use it anywhere. The files will be in the "user://" path.
Thank you so much all for help me B)