[Android] How to share a directory between two apps?

I’d like to be able to read/write files and directories from a directory where another app reads and writes files and directories.

Apparently, I can only access dataPath, persistentDataPath and StreamingAssetsPath. How do other apps write in other directories?

The directories for dataPath and persistantDataPath are usually protected folders which can only be accessed by the app they belong to. So there’s no way another app can access files in those folders. StreamingAssets is not an actual folder. The path returned is actually an URL to a location inside the APK package. This “folder” can only be accessed through the WWW class or a UnityWebRequest.

You should store the files in a public folder where every app has access to. WoozyBytes posted an example over here how to get the default external storage path.

.
If you want to access data another app stores in it’s private folders you’re out of luck. Only with root access you could access those folders.

I didn’t explain my case correctly. I do want to apps to share a public folder, not their private ones. I’m checking that example. Thanks!

By the way, why do I have to go for the external data path? I’d like to read/write in the internal storage. Ideally I’d like to use a directory in the same path as Download, DCIM ,etc.