Passing any variable value from Java to JavaScript
<p>I'm using a webview in my android application, and the web address that the webview loads contains some JavaScript. Now, I just want to know if it is possible to pass in some variable values from my Java Code to my JavaScript.</p>

<p>Here's my code:</p>

<pre><code>public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.map_layout);
    webView = (WebView) findViewById (R.id.webview);
    WebSettings webViewSettings = webView.getSettings();
    webViewSettings.setJavaScriptEnabled(true);
    webView.addJavascriptInterface(new transferPlaceId(), "Android");
    webView.loadUrl("http://webaddress.com/directory/page.html");
</code></pre>

<p>}</p>

<p>Javascript Interface works well, no need to worry about it.
Any help will be much appreciated. Thanks in advance!</p>
