Showing posts with label Android Code. Show all posts
Showing posts with label Android Code. Show all posts

Sunday, June 8, 2014

Calling Javascript from Android Java coding

In Android application, WebView is the component for display web pages. As Hybrid application are popular now, there are needs of calling javascript method from Android Java coding. We can do this by implement the addJavascriptInterface method in WebView.

The following example demonstarte this:
Step 1: Create a new Android project "JavascriptDemo" in Eclipse. A html web page is created in the assests directory.