In Android 29, I want to be able to share large files between multiple Android users. Is it possible to make a shared directory that users can access? And can that directory be made browse-able by applications that the users have installed?
Or perhaps have one user with the original directory and files, and other users have a mounted/symlinked directory?
It is important for my implementation that an installed app can access this directory.
I have been navigating the Android filesystem and trying to get my head around:
/mnt/user/0, /storage/emulated/0, and /data/media/0/ but I cannot see a way to make a symlink in another user's home directory to a folder within these directories.
The directory that you are looking for is actually
/storage/emulated/0in your case. I mean the only directory that could be used/accessible by all other applications is the external storage.However, from Android Q (targetSDKVersion 29), the external storage permission has quite a few changes.
I would recommend looking into the documentation of
getExternalStoragePublicDirectoryif you are on an Android version that is less than Android Q.For Android Q and greater, I would recommend looking into the documentation of
getExternalFileDir.Also, there is a great article from @CommonsWare regarding this. Please have a look here in his blog post. I am quoting from his blog here.