As getExternalStoragePublicDirectory has been deprecated in Android Q
, and the recommendation is to use other means. then how can we specify that we want to store the generated photos from a camera app into the DCIM
folder, or a custom sub-folder within the DCIM
?
The documentation states that the next 3 options are the new preferred alternatives:
Option 1 is out of the questions as it would mean that the photos get deleted if the app gets uninstalled.
Option 2 is also not a choice, as it would require the user to pick the location through the SAF file explorer.
We are left with option 3, the MediaStore; but at the time of this question there is no documentation on how to use it as a replacement for getExternalStoragePublicDirectory in Android Q.