Hello,
I am using latest apache cordova android version 

I have old code for embeding webview and I have connection with WebRtc 

So **i have to override setWebChromeClient**  method of SystemWebview.java file 
for Webrtc connection 


my code snippet is below 

```

SystemWebView   cwv =  (SystemWebView) findViewById(R.id.SystemWebView);

cwv.setWebChromeClient(new WebChromeClient() {

                                @Override
                                public void onPermissionRequest(final 
PermissionRequest request) { // this for webrtc connection

                javaToJavascript.webrtcCallLog("web.java", "permission asked 
is"+ Arrays.deepToString(request.getResources()),0); //This logs the type of 
permission asked
                                        Log.i("The list of permission asked is 
", Arrays.deepToString(request.getResources())); // this askes for 
android.webkit.resource.AUDIO_CAPTURE permission

                                        getActivity().runOnUiThread(new 
Runnable() {
                                                
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
                                                @Override
                                                public void run() {
                                                        Log.i("Value Of the 
permission asked is ", request
                                                                        
.getOrigin().toString());

                                                        
request.grant(request.getResources());

                                                }
                                        });

                                }


```

**And SystemWebview.java Method is as follows** 

```

    @Override
    public void setWebChromeClient(WebChromeClient client) {
        chromeClient = (SystemWebChromeClient)client;
        super.setWebChromeClient(client);
    }

```
Now i got error regarding 

> My class (WebCall)  cant cast to SystemWebChromeClient 

I stuck in this problem since 20 to 30 days...
Please any help would be appreciable   


[ Full content available at: https://github.com/apache/cordova/issues/15 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to