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
yii2
atom-editor
netbeans
syntax
rsyslog
routes
cvs
filtering
jsrender
sharepoint-designer
v8
jpeg
binary-tree
onelogin
uber-api
android-youtube-api
iggrid
midi
phaser
fallback
django-simple-history
openrefine
angular-ui
text-rendering
nhibernate-envers
dbext
visjs
ml
csrf-protection
shopware
microsoft-sync-framework
facet
intel-pin
fgetcsv
spring-mybatis
jaxb2
libssl
fabric8
functor
data-manipulation
pdb
openoffice.org
xmlreader
environment-modules
fusionpbx
revolution-slider
web-mining
jna
unobtrusive-validation
splice
flashair
sas-jmp
auto-update
apache-fop
komodoedit
react-scripts
return-value
dotnetzip
rdfs
git-diff
aurelia-validation
pg-dump
qtwebview
imanage
setuptools
firmata
url-pattern
spring-android
libpng
slicknav
sts-springsourcetoolsuite
lttng
markojs
prettytensor
actionbardrawertoggle
hill-climbing
yaws
bluegiga
design-by-contract
hsv
marching-cubes
method-parameters
csquery
android-imagebutton
mdt
client-side-templating
rdl
has-many-through
sgen
phpthumb
system.net.webexception
oracle-warehouse-builder
meteor-velocity
message-driven-bean
fmod
jplaton
flashvars
e4x
dsn
automount
nsmanagedobject
punbb
joyent
psi
rfc1123
appendto
site.master
revisions
meego
substrings
boost-smart-ptr
nerddinner
scripting-languages
wsdl.exe
3gp

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