• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Saving generic files in latest Android SDK to shared storage


May 4, 2023
I develop an open source app (OpenLiveStacker) the communicates with external USB camera - astronomy device.

It mostly written in C++ (as it does not run on Android only) with small Java/Android wrapper the manages it.
One of the things I need to do is to save collected images (tiff files) and meta-data + logs on each and every image.

Till now I created directory DCIM/OpenLiveStacker and some sub-directories for various data files: images, json, text, csv - all the data
I collect from the camera and it can be used later for processing offline with various tools.
I asked read/write permissions and it worked wee.

When I try to upgrade to latest targetSDK (33) - so I can publish it on Google play store it all stops working. I don't have permissions to write there. From what I understand requesting MANAGE_EXTERNAL_STORAGE permission is not going to work on Google play

I started reading about about Scoped Storage but from what I understand I still can't access it via Java File or C++ fstream/fopen but I need to use specific API and it is limited to specific media types. Do I understand correctly?

Is there any way to save generic files to storage visible and accessible easily to user and I can access with standard API?
  • Like
Reactions: KenSCasey


We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.