I am writing an application that can import and export data and I need the path to this data to be accessible to the user, but not on the SDcard. I would prefer to put it somewhere alongside the Downloads folder, or somewhere visible to a file explorer without root permissions. I do NOT want to save data to /data/data, but I would like to save it somewhere in /storage/emulated/0/. I don't know how to specify this location in a way that would support all android devices.
I have looked at many threads that are similar but not exactly what I want. Saving to the SDcard is not desirable since not everyone has external storage, but I also don't want to save to File.applicationDirectory or File.applicationStorageDirectory because the User is unable to view these locations.
Copyright Notice:Content Author:「Raptor Jessus」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/57585066/how-do-i-save-files-to-a-user-accessible-location