I am working on HTML5 mobile app, that needs a Java library to be complete. So I want to know exactly how to invoke java method from within javascript? The HTML5 will be wrapped in a WebView or something in Android app. I need to know exactly how to invoke the java library from wi开发者_运维百科thin HTML5. Please be as specific as possible.
Have you checked out PhoneGap? It lets you build Android apps in HTML5 using a WebView and also lets you create Plugins written in Java and Objective-C.
PhoneGap http://www.phonegap.com/
Examples: https://github.com/phonegap/phonegap-plugins
精彩评论