My intention is to save a file available for the user in his internal storages /Documents
path.
Since Environment.getExternalStoragePublicDirectory()
is deprecated now I am looking for an alternative.
Google tells me following alternatives:
getExternalFilesDir(String type)
from Context [LINK]MediaStore.Files
← I don't get this anyway [LINK]Intent.ACTION_OPEN_DOCUMENT
where the user can specify the path himself [LINK]
getExternalFilesDir()
is not working - the way I use it - for my intention. This saves the files in the apps own directory where it is hardly accessible for the user, when I use Environment.DIRECTORY_DOCUMENTS
or null
as the argument.
The intent one is a very good alternative I wanted to implement anyway but in my apps paid version. For the free version I want to store the file in a fixed location accessible for the user.
Thank you for your help in advance!