I want to save image to public Pictures directory and then share it with other apps. For this :
- I checked Android docs (FileProvider and Setting Up File Sharing).
- I also checked many StackOverflow questions.
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
?