Android WebView get HTML source

This may not work on android 4.3 and later because of webview thread security enhancement

In android WebView is the heart when developing Hybrid application. During development of such apps we might need view the source code web page in webview. Here is a piece of code which do the need. The basic idea is install a javascript interface to webview to handle html callback, then call the javascript on webview invoke the method.

first of all setup webview for enabled javascript,assign a custom webclient.


Continue reading Android WebView get HTML source