Code example for WebResourceResponse

    private static class InterceptClient extends WebViewClient {
        public WebResourceResponse shouldInterceptRequest(WebView view, java.lang.String url) {
            try { 
                return new WebResourceResponse("text/html", "utf-8",
                        new ByteArrayInputStream(RAW_HTML.getBytes("UTF-8")));
            } catch( e) {
                return null; 
    public class AndroidInterface { 
        public void androidLog(final String msg) {
            Handler handler = new Handler(new Handler.Callback() {
                public boolean handleMessage(Message message) {
                    runOnUiThread(new Runnable() {
Connect your IDE to all the code out there  Get Codota for Java