I would like to use the crosswalk webview to load an external webRTC application website URL, currently I am using the inAppBrowser with window.open(https://www.zrg.com/mobiconnect"), but this is loading the page in the internal android webview..
Kindly let me know the exact method of using the crosswalk webview and loading the external url's.
What other plugins are required?
How can I check if the page is using a crosswalk webview?
Thanks & Regards
I have check the document and downloaded the sample, however this sample is quite old and no more compliant with the new version of XDK...
I am getting an error on the following line: var socket = io.connect
Kindly check if there is any updated code available for the current release and what action needs to be taken for web socket connectivity.
Bit6 has published a nice tutorial just today showing how to incorporate their Bit6 plugin for WebRTC using XDK. I have not tried it myself yet, but maybe it will help you. Here is the link: http://docs.bit6.com/start/cordova-xdk/
@Arif, Please use target as '_blank' with window.open. This will open an inAppBrowser instance which will be running in the crosswalk webview if your app is built with Crosswalk. You haven't specified target and it defaults to '_self'.
window.open(URL, '_blank', 'location=no');
Also, I highly recommend you call the inappbrowser API directly and not use the shadowed window.open function, that will go away and cause errors in future versions. See the docs here > https://github.com/apache/cordova-plugin-inappbrowser
Hi there, Pls see the feedback.
Following is the mobile responsive website I want to access from android device (Samsung S7 and Note 4):
Website URL: https://www.zrg.com/mobiconnect
The web site is successfully working in Android Chrome browser Ver 48.0 & 49.0
In XDK I have taken a new Android CrossWalk project of inAppBrowser template and used the inAppBrowser API call as per your recommendation as follows:
var ref = cordova.InAppBrowser.open('https://www.zrg.com/mobiconnect', '_blank', 'location=no');
The webview is loading the above website in the Emulation mode successfully and has no issues, however once I am loading it into Android Device I am facing an issue, once the login name and password is entered there is an error generated,
Failed to get access to local media Error: user media access fail.
I have taken few other plug-ins for permissions like the Camera, Capture and Media for GetUserMedia permissions, but it did not help.
Not knowing what is on that page (https://www.zrg.com/mobiconnect/) that you are trying to open in the app, it's hard to say what permissions are needed or why you are getting the error. You can add Android permissions, manually, on the Build Settings section of the Projects tab. Have you confirmed that you have your whitelist settings correctly configured (also on the build settings section)? When you open as you have done (_blank) you are opening in the context of the containing app's webview. I recommend that you do this with Crosswalk, unless you are limiting your app to use on Android 5+ devices.
I have already taken the following plugins in the project:
Camera, Capture, Device, Media
I have tried to give manual permissions in the setting tab as CAMERA; but did not help.
Is there any other plugin or permissions required to enable the getUserMedia to access my phones camera/microphone?
Please note that the same code is running fine in Chrome & Firefox browsers for android 5+.
getUserMedia is a deprecated navigator API, it is not part of those plugins. Please see the plugin docs for their respective APIs. Also, the plugins will automatically provide the proper Android permissions, so there's nothing for you to do there.
For example, for the Cordova Media plugin > https://github.com/apache/cordova-plugin-media
Arif - have you had luck with the plugin APIs? As Paul says, getUserMedia is a web API, not a mobile API, and it is deprecated. The plugin APIs will serve you better for mobile apps.
I was able to find one cordova webrtc Plugin,
but unfortunately this is only for iOS6 and not available for Android yet.
I would appreciate if you can point out for any possible plugin...
By the way the sample webrtc application that comes with XDK is also not getting the camera access, I saw the code and it is also using the getusermedia api...
navigator.getUserMedia(constraints, handleUserMedia, handleUserMediaError);
My webRTC issue for Android/Crosswalk is finally resolved... thanks for all the support...
CAMERA;RECORD_AUDIO;MODIFY_AUDIO_SETTINGS; in build settings permissions need to be set.
Now I am moving towards iOS compliance, do I have follow any special instructions on this or WKWebview plugin will do the job?