0

I want to save image to public Pictures directory and then share it with other apps. For this :

but they only talk about saving file to our package's storage area.

I want to write code which would be compatible from API 16(Jelly Bean 4.1) to latest API 30(R). Code which I wrote work fluently below Nougat. I know I need to use FileProvidr, <provider> and <path>. But how to save image to Public Pictures folder?

Should I have to use MediaStore, ContentPRovider, ContentValues API?

When we should use FileProvider and when we should use MediaStore?

gpl
  • 1,380
  • 2
  • 8
  • 24
  • You can write your files to the public directories. In the same way you write them to app specific or app private locations. – blackapps Apr 09 '21 at 08:03
  • old method not works in Nougat+ and `` give links of `/data/data//...` – gpl Apr 09 '21 at 08:27
  • Best answer: https://stackoverflow.com/questions/57357175/how-to-save-image-to-camera-folder-in-android-q/57357571#57357571 Some other nice answers: https://stackoverflow.com/questions/56904485/how-to-save-an-image-in-android-q-using-mediastore – gpl Apr 09 '21 at 09:55

0 Answers0