You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "asfackahamed (via GitHub)" <gi...@apache.org> on 2024/12/19 16:08:20 UTC

[I] Add onPermissionRequest Implementation in InAppChromeClient.java [cordova-plugin-inappbrowser]

asfackahamed opened a new issue, #1079:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1079

   # Bug Report
   
   Add onPermissionRequest Implementation in InAppChromeClient.java
   
   ## Problem
   
   The current implementation of InAppChromeClient.java in the cordova-plugin-inappbrowser lacks support for the onPermissionRequest method, which is required to handle runtime permissions in WebView.
   
   ### What is expected to happen?
   
   When a webpage or embedded content within the InAppBrowser requests permissions (e.g., accessing the camera, microphone, or location), the onPermissionRequest method should handle the request appropriately.
   
   ### What does actually happen?
   
   Permissions requested by the webpage are not granted, as the onPermissionRequest callback is missing. This leads to functionality like video calls or location access failing within the WebView.
   
   ## Information
   
   The cordova-plugin-inappbrowser currently does not handle runtime permission requests via the onPermissionRequest method in InAppChromeClient.java. This issue primarily affects apps requiring access to hardware features such as the camera or microphone through WebView.
   
   
   ### Command or Code
   To reproduce the issue, navigate to a webpage inside the InAppBrowser that requests access to hardware features, such as:
   
   - Camera (e.g., for video calls)
   - Microphone
   - Geolocation
   
   ### Environment, Platform, Device
   
   Platform: Android
   Device: Any Android device running a Cordova app using cordova-plugin-inappbrowser
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ x] I searched for existing GitHub issues
   - [x ] I updated all Cordova tooling to most recent version
   - [ x] I included all the necessary information above
   


-- 
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: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Add onPermissionRequest Implementation in InAppChromeClient.java [cordova-plugin-inappbrowser]

Posted by "asfackahamed (via GitHub)" <gi...@apache.org>.
asfackahamed closed issue #1079: Add onPermissionRequest Implementation in InAppChromeClient.java
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1079


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Add onPermissionRequest Implementation in InAppChromeClient.java [cordova-plugin-inappbrowser]

Posted by "asfackahamed (via GitHub)" <gi...@apache.org>.
asfackahamed commented on issue #1079:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1079#issuecomment-2554868755

   Upon reviewing the code again, I noticed that the onPermissionRequest callback has already been added as part of [this pull request](https://github.com/apache/cordova-plugin-inappbrowser/pull/968/files). My apologies for the oversight on my end.
   
   I appreciate the effort and time that has gone into maintaining this plugin and addressing such scenarios. I'll go ahead and close this issue now. Thank you again for your support and the excellent work!


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Add onPermissionRequest Implementation in InAppChromeClient.java [cordova-plugin-inappbrowser]

Posted by "asfackahamed (via GitHub)" <gi...@apache.org>.
asfackahamed commented on issue #1079:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/1079#issuecomment-2554842036

   Implement the onPermissionRequest callback in InAppChromeClient.java as follows:
   
   @Override
   public void onPermissionRequest(PermissionRequest request) {
       request.grant(request.getResources());
   }
   


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org