Android Studio MediaStore, below SDK 29 save image in sd card fails
问题 I need to save image in sd_card's pictures directory below Android 10.I have implemented scoped storage & This code works in sdk 29 & above, because MediaStore.getExternalVolumeNames was added in sdk 29. Below sdk 29 how to get getContentUri of sd_card . val values = ContentValues().apply { put(MediaStore.Images.Media.DISPLAY_NAME, destinationFileName) put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg") put(MediaStore.Images.Media.RELATIVE_PATH, Environment.DIRECTORY_PICTURES + File