@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button button = (Button)this.findViewById(R.id.button1); this.webview = (WebView)this.findViewById(R.id.webView1); //webview.setWebChromeClient(new WebChromeClient()); final String htmlPre = "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"utf-8\"> <script src='http://debug.phonegap.com/target/target-script-min.js#anonymous'></script> <script>alert('hello')</script></head><body style='margin:0; pading:0; background-color: black;'>"; final String htmlCode = " <embed style='width:100%; height:100%' src='http://www.platipus.nl/flvplayer/download/1.0/FLVPlayer.swf?fullscreen=true&video=http://www.platipus.nl/flvplayer/download/pl-600.flv&autoplay=true' " + " autoplay='true' " + " quality='high' bgcolor='#000000' " + " name='VideoPlayer' align='middle'" + // width='640' height='480' " allowScriptAccess='*' allowFullScreen='true'" + " type='application/x-shockwave-flash' " + " pluginspage='http://www.macromedia.com/go/getflashplayer' />" + ""; final String htmlPost = "</body></html>"; this.webview.getSettings().setJavaScriptEnabled(true); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub webview.loadDataWithBaseURL("null", htmlPre+htmlCode+htmlPost, "text/html", "UTF-8", null); } });HTML page and everything was great. However when I try to debug my real webview that does not load content from an url (webview.loadurl) but to load from data Weinre cannot detect the target anymore.
charset=\"utf-8\"> <script src='http://debug.phonegap.com/target/target-script-min.js#anonymous'></script>
Excuse me can I ask you one more silly question? My webview content is kind of long that I have to scroll to see it all. However, the Weinre highlighters seems to be in "fixed position", I know in the script file it is "absolute" but when I scroll the highlighter of the upper text is still there on the screen while the highlighter of the below ones is nowhere to be seen because it is outside of the screen. How can I fix this problem? Thanks a lot.