How to load assets file

I want to load my Android Game assets file?
I used :File file=File(dir);
how to input the “dir”

I’d also like to know how to access the “assets” path easily with Juce. The File class doesn’t seems to have Android-specific methods.

I’ve never used the assets on android, but a quick search seems to show that they’re not actually files at all - they’re never unpacked from the apk, and there are java methods for streaming the data from them.

If you need the data in your c++ code, you’d have better performance by using the introjucer to bake the files into a BinaryData object and hit the bytes directly rather than packaging them with the java tools.

My current data files are already baked in the source, but I’ll need to create/save/load XML files from my app. Is there a specific folder accessible via Juce to do this?

Edit: found it: you can use File::getSpecialLocation(File::userApplicationDataDirectory).