2

I'd like to store media files (e.g. *.mp3), captured with my app, locally on the device (e.g. smartphone) and accessible via the file browser.

By default I got recommended the DocumentDirectoryPath (/data/data/org.xxx.yyy/files). Unfortunately, this directory is only accessible by the app itself, if the device is not rooted (how to read the data via adb).

I was thinking about changing the directory to /Android/data/org.xxx.yyy/files, but I'm not sure if it's a good practise as I'm not able to save files via file://Android/data/org.xxx.yyy/files/testfile.txt (don't know why, yet).

I'd like to use a common way to cover as much devices and android versions as possible. Where should I store the files?

Please note: this question is easily understood as "opinion-based", but I'm really looking for common guidelines.

Thanks in advance!

Community
  • 1
  • 1
Mr. B.
  • 8,041
  • 14
  • 67
  • 117
  • 1
    `/Android/data/org.xxx.yyy/files,` That path does not exist to begin with. Have a look at `getExternalFilesDir()` to see the full path. Have a look st `getExternalStorageDirectory()` too. – greenapps Oct 20 '16 at 15:51

0 Answers0