- Home /
Android Data Directory
I think I found the cause of my "Android Blues." The application will load and run, but you can't save anything. I went looking and found that there wasn't a data directory for my program, the data/com.companyname.appname did not exist. So how do I create it so it can store the information and I can get back to finishing it.
string bundle="com.companyname.appname";` Application.persistantDataPath + "/data/" + bundle;` --Is this correct? I would have thought since you enter the information bundle in settings that it would do it for you?
Does the fact that I'm still running XP with Unity 5.2 have any bearing on this? Thanks for the help!
In your Player settings, did you check the box to force SD card permissions?
Serializating files did not really work without it, which is annoying since android allocates us an internal location, but I couldn't save images internally or anything without switching that on. Also if you still have issues, and I totally understand wanting your own code to perform the task, but the Unified Android API on the Asset Store actually has some really nice file-system support. Sadly it's dead and the documentation is gone, but if you can code, reading through some class files to find what you want should be easy.
Rob, Still having trouble creating that data directory. I set it for automatic. I'll try setting it to external and see what happens. Thanks for the API, I did find it and will take a look at it. Why do they make it so hard to port out to android?!? Any further help would be great!
Your answer
![](https://koobas.hobune.stream/wayback/20220612110933im_/https://answers.unity.com/themes/thub/images/avi.jpg)