Reputation: 370
In my Cordova app how can I test if Crosswalk (https://crosswalk-project.org/) is correctly integrate? And how to use it to display a web page?
Upvotes: 4
Views: 657
Reputation: 789
If you don't want to do code changes to confirm, you can always use Google Chrome and do remote debugging
chrome://inspect
Ensure your app is running on your device and it's connected to your development machine. Once running, go to the Console tab and you can paste the following:
navigator.userAgent
This will output something like
"Mozilla/5.0 (Linux; Android 5.1.1; GT-N7100 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Mobile Crosswalk/11.40.277.7 Mobile Safari/537.36"
You can see Crosswalk in the outputted text.
Upvotes: 0
Reputation: 433
I had difficulty working with the crosswalk cordova examples provided by intel.
Joe Bowser, Android platform lead on Cordova, did a proof of concept, and keeps it here: https://github.com/infil00p/cordova-android/tree/pluggable_webview
Follow his readme to get up and running with crosswalk and cordova in no time.
To ensure that you are actually in the XWalk environment, you can use navigator.userAgent
a log of navigator.userAgent
in Chrome yields:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/36.0.1985.125 Safari/537.36
checking navigator.UserAgent in the xwalk environment should have Mobile Crosswalk/5.34.104.2
in the resulting string
edit formatting
Upvotes: 3