New issue
Advanced search Search tips

Issue 638244 link

Starred by 5 users

Issue metadata

Status: Duplicate
Merged: issue 490120
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

navigator.permissions is not available on Anroid Web View

Reported by yavuzcak...@gmail.com, Aug 16 2016

Issue description

Chrome Version       : Android 6.0.1 - System-WebView: 52.0.2743.98 
                       Works on Android-Chrome 52.0.2743.98 

What steps will reproduce the problem?
(1) set url of webview for testing permissions api https://googlechrome.github.io/samples/permissions/index.html
(2) Press "Notification" button on page. 

What is the expected result?
Permission request pop-up display for Notification 

What happens instead?

index.html:94 Uncaught TypeError: Cannot read property 'query' of undefined 
It seems navigator.permissions is not available on Android WebView



 
Cc: -timvolod...@chromium.org
Components: -Blink Blink>PermissionsAPI
Owner: timvolod...@chromium.org
Status: Available (was: Unconfirmed)
On purpose, the permissions api has been disabled on WebView. Assigning to Tim who might know more about the current plans.
I want to use permissions api, to request permission for camera and microphone.
Problem is, device label is not available on output of "mediaDevices.enumerateDevices()". 
On chrome, after giving permission to access camera and microphone device labels becomes available.

The code snippet for getting device label:
navigator.mediaDevices.enumerateDevices()
.then(function(devices) {
  devices.forEach(function(device) {
    console.log(device.kind + ": " + device.label +
                " id = " + device.deviceId);
  });
})
.catch(function(err) {
  console.log(err.name + ": " + err.message);
});  
Components: -Blink>PermissionsAPI Blink>WebRTC
Redirecting to WebRTC then.
Cc: tobiasjs@chromium.org torne@chromium.org
yes permissions api currently non available in webview, also see crbug.com/490120
I think future plans regarding this are TBD.

+cc:FYI torne@,tobiasjs@ (on potential future plans)

Mergedinto: 490120
Status: Duplicate (was: Available)

Sign in to add a comment