I am getting an error when accessing camera the error is
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 clip={text/uri-list {...}} (has extras) }
this is where the error occurs
try {
val intent = Intent("android.media.action.IMAGE_CAPTURE")
intent.putExtra(MediaStore.EXTRA_OUTPUT, mUri)
startActivityForResult(intent, CAMERA_REQUEST_CODE)
} catch (exception: Exception) {
Log.d("errorCamera", "${exception}")
exception.printStackTrace()
}
Min and target sdk version are
minSdkVersion(23)
targetSdkVersion(30)
Please suggest what I might be doing wrong here.