I have this function that saves an image to the Internal storage/Android/media
folder on your phone:
fun getOutputDirectory(): File {
val mediaDir = externalMediaDirs.firstOrNull()?.let {
File(it, resources.getString(R.string.app_name)).apply { mkdirs() } }
return if (mediaDir != null && mediaDir.exists())
mediaDir else filesDir
}
I want to change the code so that I can save the image in the default Images
folder that way when the user opens their Gallery app, they'll easily be able to see it. How do I do that?