When I lunch camera from app some time crash some time working on Android 12+ devices
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, GeneralFunctions.setImageUri(DAcitivity.this));
startActivityForResult(intent, ConstantVariables.IMAGE_REQUEST_CODE);
- Added below permission i. Camera permission : Sometimes if even after accepting permission, ii. External storage iii. Read External storage iv. android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
Camera permission : Sometimes if even after accepting permission, showing permission denied.
if (ContextCompat.checkSelfPermission(DocCollectionActivity.this,
Manifest.permission.CAMERA)!= PackageManager.PERMISSION_GRANTED) {
Log.e(TAG, "onCameraClickListener: Permission granted");
}
There are no logs showing in the log cat related to the camera issue, and the debugger gets disconnected after lunching the camera as well.
Issue Is With Software? Try These Fixes.