On Android 10 and below, when I take a picture using the code below, everything is fine except for Android 11 and above.
private fun openCameraApp() {
val photoURI: Uri = FileProvider.getUriForFile(
this,
"com.example.android.fileprovider",
appFolder
)
refresh()
val cameraIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI)
println("::Camera result:: ${photoURI}")
resultLauncher.launch(cameraIntent)
}