Android issue: how to turn webview to an other Activity by js code
<p>I have a problem. In my webview, there is a html file. A button binds with js code to trigger the java code.</p>

<pre><code>&lt;img src="start.png" id="pic1" onClick="window.intent.clickOnAndroid()"/&gt;
</code></pre>

<p>In my java file.</p>

<pre><code>webview.addJavascriptInterface(new Object(){
            public void clickOnAndroid(){
                handler.post(new Runnable() {

                    @Override
                    public void run() {
                        // TODO Auto-generated method stub
                        Intent intent = new Intent(start.this, ImgTest0201Activity.class);
                        startActivity(intent);
                    }
                });
            }
        }, "intent");
</code></pre>

<p>Everytime I clicked the image --> crashed. I think the js triggered the java code, the crash might be caused by java code. But I can not solve it. Could someone help me? Many thanks.</p>
