1, I just got this problem, and I removed the CAMERA directly.
2. The first step to determine the time to authorize.
if (build.version.Sdk_int >=23) {
int checkcallphonepermission = Contextcompat.Checkselfpermission (appointmentdetailactivity.This, manifest.permission.camera) ;
if (checkcallphonepermission! = Packagemanager.permission_granted" {
Activitycompat. This,new string[]{manifest.permission.,open_canmer) ;
return;
}else{
Showcamera () ;
}
} else {
Showcamera () ;
} /span>
The second step receives the returned result.
@Override
public voidOnrequestpermissionsresult (int Requestcode, string[] Permissions, int[] grantresults) {
Switch (requestcode) {
CaseOpen_canmer:
if (grantresults[0] = = Packagemanager.permission_granted) {
Showcamera ();
} else {
Toast. This, " Camera permissions disabled. Be sure to turn on the camera right "length_short). Show () }
break;
default:
super.onrequestpermissionsresult ( Requestcode;
}
} /span>
With revoked permission Android.permission.CAMERA