java.lang.Object | |
↳ | android.webkit.PermissionRequest |
This class defines a permission request and is used when web content
requests access to protected resources. The permission request related events
are delivered via onPermissionRequest(PermissionRequest)
and
onPermissionRequestCanceled(PermissionRequest)
.
Either grant()
or deny()
must be called in UI
thread to respond to the request.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | RESOURCE_AUDIO_CAPTURE | Resource belongs to audio capture device, like microphone. | |||||||||
String | RESOURCE_PROTECTED_MEDIA_ID | Resource belongs to protected media identifier. | |||||||||
String | RESOURCE_VIDEO_CAPTURE | Resource belongs to video capture device, like camera. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Call this method to deny the request.
| |||||||||||
Call this method to get the origin of the web page which is trying to access
the restricted resources.
| |||||||||||
Call this method to get the resources the web page is trying to access.
| |||||||||||
Call this method to grant origin the permission to access the given resources.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Resource belongs to audio capture device, like microphone.
Resource belongs to protected media identifier. After the user grants this resource, the origin can use EME APIs to generate the license requests.
Resource belongs to video capture device, like camera.
Call this method to get the origin of the web page which is trying to access the restricted resources.
Call this method to get the resources the web page is trying to access.
Call this method to grant origin the permission to access the given resources. The granted permission is only valid for this WebView.
resources | the resources granted to be accessed by origin, to grant
request, the requested resources returned by getResources()
must be equals or a subset of granted resources.
This parameter is designed to avoid granting permission by accident
especially when new resources are requested by web content.
|
---|