How to get directory path of external storage?

Hi, I wonder if It’s possible to get the directory path of the external storage of Android device in std::string so I can write files using this path and also allow users to have access to these files.

I found this documentation about saving files on Android.
For example, I’m trying to use getExternalFilesDir() method to get the root directory for my app’s private directory on the external storage.
Is it possible to get this directory as std::string so I can use it in ofApp’s class method? (ofApp.cpp file)
Thanks in advance!

Hi, Did you solve this? I have a lot of media that I need to download as the apk’s main extension pack obb file - but not sure how to access these directories.
Fingers crossed in advance etc.

No. I could not solve this. Please let me know if you do.

Yes I have! I’ve written some extra methods, c++ /java, for ofAndroid to async mount the expansion packs and return their location.

I thought I’d share them her once I’ve removed the hard coded file name bits and add the second pack not just the main. … Sometime in mid January i expect. Nudge me! :slight_smile:

I’ve also documented my set up, I wasted loads of time fiddling around so wanted to be able recreate it again easily.

I believe the external storage (sdcard) path is documented in ofAndroid if that’s what you wanted?


1 Like