Can javascript be used to delegate events to a native android application?
Is it possible to invoke a method or a function of a running android application using javascript?? OR 开发者_JS百科Is there a possible way to communicate between Javascript and native android application??
Yes, there's such a method. Just use the WebView.addJavascriptInterface()
method. It creates a javascript variable which is bound to a java object. You'll be able to call methods of this object from your javascript code.
精彩评论