I'm getting the following error in Firebase from HUAWEI devices:
Fatal Exception: java.lang.SecurityException
Permission Denial: starting Intent {
act=android.media.action.STILL_IMAGE_CAMERA_SECURE flg=0x10000000
cmp=com.huawei.camera/.controller.SecureCameraActivity
}
from ProcessRecord{d677674 11018} (pid=11018, uid=10125)
requires com.huawei.camera.permission.PRIVATE
I added this permission to the manifest file but still no luck i'm trying to open the camera with "android.media.action.STILL_IMAGE_CAMERA_SECURE" intent.
any info on this problem with huawei devices?
the code i'm using
intentAboveM = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE);
intentAboveM.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
if(intentAboveM.resolveActivity(getPackageManager()) !=null) {
this.startActivity(intentAboveM);
}
This message indicates that you need to obtain the security camera permission.
android.media.action.STILL_IMAGE_CAMERA_SECURE
does not require permissions. You may have invoked other components. For security reasons, this component needs to obtain permissions:
You got this "Fatal Exception: java.lang.SecurityException" for "android.media.action.STILL_IMAGE_CAMERA_SECURE" intent, is because: the permission you asked for is EMUI level of camera permission, which is not opened to 3rd party users on Huawei platforms. There is no way for your App. to be granted with this permission on Huawei phones. However if you would like to post your detailed use case in this thread, we might be able to find some alternative solutions for you.
User contributions licensed under CC BY-SA 3.0