crosswalk-runtime


How to enable javascript in XWalkView?


this URL shows how is used to be done:
http://zhangwenli.com/blog/2014/08/25/crosswalk-calling-java-methods-with-javascript/
However, the getSettings() function is now removed.
How does one now enable Javascript ?
public class MyActivity extends Activity {
private XWalkView xWalkWebView;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.my_activity_xml);
xWalkWebView = (XWalkView)findViewById(R.id.xwalkView);
xWalkWebView.addJavascriptInterface(new WebAppInterface(), "Android");
xWalkWebView.load(url_your_want_to_load,null);
}
public class WebAppInterface {
#org.xwalk.core.JavascriptInterface
public void callFunction(){
// Do your Android Stuff here
}
}
}
Now Call function in your page as:
Android.callFunction();

Related Links

Cross walk crash analysis
Crosswalk - prevent displaying the app icon at the startup
CrossWalk Error: Packaging failed
Does Crosswalk support HSTS and HPKP?
How to disable Chrome data saver in crosswalk webview?
Cordova Crosswalk + Framework7: Pixel errors
Can I use an external url for creating an Android app with CrossWalk?
How to enable javascript in XWalkView?
Is there a way to turn off same origin policy on the crosswalk webview for certain iframes?
Use of window.location.href in crosswalk
Crosswalk Cordova does not build with Android 4.0.3

Categories

HOME
twitter
testing
reflection
push-notification
google-api-php-client
plone
appx
platform-builder
paradox
slick-slider
gorm
zend-framework3
flask-wtforms
dynamics-crm-online
ef-migrations
propel
beyondcompare
visjs
jquery-ajaxq
cloudhub
graphicsmagick
captiveportal
restful-authentication
cas
uninstall
fifo
neo4j-spatial
ejabberd-module
usbserial
framemaker
revolution-slider
xcode-extension
espeak
unobtrusive-validation
awt
email-templates
eclipse-scout
janrain
node-gyp
fakeiteasy
skeleton-css-boilerplate
auto-update
menuitem
errordocument
jquery-nestable
boost-multi-index
nstextview
nativeapplication
sqlbulkcopy
gcsfuse
vtigercrm
jquery-filter
setuptools
asp.net-4.5
thrust
google-web-starter-kit
pagerank
ptrace
asp.net5
ora-00900
django-unittest
feedback
interrupted-exception
processmodel
cisco-ios
directoryservices
npapi
xc16
tablelayout
document-classification
mesa
phpthumb
srs
uv-mapping
aqtime
apc
flash-builder4.5
batterylevel
qt-faststart
rabl
pushbackinputstream
android-screen-support
type-equivalence
drools-planner
robotics-studio
jquery-knob
quickdialog
cinema-4d
jmock
lpeg
sudzc
createwindow
.nettiers
dmx512
kdbg
simpletest
yagni
sector

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App