rokanraja1 commented on PR #839:
URL: 
https://github.com/apache/cordova-plugin-camera/pull/839#issuecomment-1685808012

   
   On 21-Aug-2023 12:59 pm, Francesco ***@***.***> wrote:
   
   @spiderciccio commented on this pull request.
   
   ________________________________
   
   In 
src/android/CameraLauncher.java<https://github.com/apache/cordova-plugin-camera/pull/839#discussion_r1299713366>:
   
   > @@ -1312,20 +1312,39 @@ public void onScanCompleted(String path, Uri uri) {
        }
   
        public void onRequestPermissionResult(int requestCode, String[] 
permissions,
   -                                          int[] grantResults) {
   -        for (int r : grantResults) {
   -            if (r == PackageManager.PERMISSION_DENIED) {
   -                this.callbackContext.sendPluginResult(new 
PluginResult(PluginResult.Status.ERROR, PERMISSION_DENIED_ERROR));
   -                return;
   +                                          int[] grantResults) throws 
JSONException {
   +        String version = android.os.Build.VERSION.RELEASE;
   +        if(Integer.parseInt(version) <= 13)
   +        {
   +            if(PermissionHelper.hasPermission(this, 
Manifest.permission.CAMERA)) {
   
   
   question: have you tested this line, because in my test in android 13 
hasPermission is every time false, or you call a request to have permission, or 
remove this line(my android 13 worked without this if)
   
   —
   Reply to this email directly, view it on 
GitHub<https://github.com/apache/cordova-plugin-camera/pull/839#pullrequestreview-1586366355>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/A5WIOIEFJRK2IHVF2OBJUQDXWME4XANCNFSM6AAAAAA2LIFRYU>.
   You are receiving this because you authored the thread.Message ID: 
***@***.***>
   
   Maybe your camera permission is issue
   


-- 
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]

Reply via email to