Houdhey commented on issue #797:
URL:
https://github.com/apache/cordova-plugin-camera/issues/797#issuecomment-1196472206
After investigating, the error comes from this method on CameraLauncher.java
file :
```
public void onRequestPermissionResult(int requestCode, String[]
permissions,
int[] grantResults) {
for (int r : grantResults) {
System.out.println("PHOTO DEBUG - " + r);
/* if (r == PackageManager.PERMISSION_DENIED) {
this.callbackContext.sendPluginResult(new
PluginResult(PluginResult.Status.ERROR, PERMISSION_DENIED_ERROR));
System.out.println("PHOTO DEBUG - " + r);
return;
}
*/
}
switch (requestCode) {
case TAKE_PIC_SEC:
takePicture(this.destType, this.encodingType);
break;
case SAVE_TO_ALBUM_SEC:
this.getImage(this.srcType, this.destType);
break;
}
}
```
If I comment this section about comparing value of r and
PackageManager.PERMISSION_DENIED value, camera and gallery work good.
I'm not Android Expert but i try to get explanations
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]