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
testng
netsuite
spagobi
routes
rsync
filtering
fingerprint
webrequest
event-handling
windows-server-2012
caml
clearcase-ucm
serilog
nhibernate-envers
visual-composer
object-detection
claims-based-identity
rundeck
buildbot
linkerd
strncpy
publish
opentype
subdomains
bcd
siesta-swift
grails-3.1
repo
accelerate-framework
android-ble
adobe-premiere
espeak
libvpx
impersonation
document.write
temporary-files
hp-ux
botbuilder
spring-security-kerberos
password-encryption
qcombobox
long-polling
chain-builder
idisposable
gcsfuse
hittest
mediaelement
google-cdn
azure-sdk
infix-notation
database-optimization
testng-dataprovider
rvest
rhino-servicebus
revolution-r
xpath-1.0
wapiti
reactive-banana
msys
wireshark-dissector
coveralls
browser-bugs
sniffer
graph-api-explorer
jsonpickle
mdt
titanium-modules
funcunit
android-2.2-froyo
apc
dbconnection
dotnetnuke-5
bulkloader
django-nonrel
orchardcms-1.7
tinn-r
mhtml
viewswitcher
wse3.0
reddot
removeclass
asyncfileupload
hgsubversion
external-accessory
appendto
mongomapper
w3wp.exe
routedevent
vc90
database-management
zend-tool
iweb
ti-dsp
geneva-server
3gp
uiq3

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