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
ibm-bluemix
vim
wso2
rsyslog
rsync
electronics
acquia
constraint-programming
cloudkit
user-input
hex-editors
windows-server-2012
iolanguage
google-static-maps
oracle-coherence
scichart
crystal-reports-2010
angular2-aot
buildbot
url-scheme
srcset
retina-display
withings
service-discovery
webdriver-manager
opshub
heightmap
termination
revapi
powercli
windows-iot-core-10
lync-client-sdk
titanium-android
url-pattern
spring-android
android-textview
elements
login-control
storekit
qgraphicsview
dlna
ipconfig
rhino-servicebus
google-places
cyclomatic-complexity
wireshark-dissector
deis
sankey-diagram
kineticjs
dia
typekit
qpainter
android-imagebutton
socketexception
seaside
mechanize-ruby
oracle-warehouse-builder
monomac
fmod
ms-project-server-2010
access-rights
inbox
sqlperformance
jelly
typoscript2
netbeans-6.9
cufon
floating
sproutcore-2
bespin
memory-size
phonon
multiple-languages
windows-live-messenger





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