Android internal storage


Hi all,

does anyone knows if there is a “JUCE” way to read/write a file in an Adroid device’s “internal storage” ?
I’ve tried all the File::getSpecialLocation() locations, and all return a path that is not accessible by any file browser.



You also need to check storage read/write permissions in the Projucer:


Hi Fabian,

Yes I had already set these permissions at Projucer’s “Custom Permissions”, and have also tried with these Projucer’s permissions checked instead of setting them manually (as you show above).

In both cases I think I get an assertion at the TemporaryFile.cpp at line 93 (as stated by Android Studio’s Android Monitor!), that has a comment that my write failed. I am trying to write a file like so:

File tmp = File tmp = File::getSpecialLocation(File::userDocumentsDirectory).getChildFile("somefolder/somefile.json");
If (!tmp.exists()) tmp.create();

Is this a wrong way/folder or do I need any other permissions?