Code example for WebResourceResponse

0
    @Override 
    @android.annotation.TargetApi(11) 
    public WebResourceResponse shouldInterceptRequest(String url) {
        ByteArrayInputStream stream = new ByteArrayInputStream(url.getBytes());
        this.onOverrideUrlLoading(url);
        return new WebResourceResponse("text/plain", "UTF-8", stream);
    } 
 
 
    @Override 
    public boolean onOverrideUrlLoading(String url) {
 
        Log.d(TAG, "[Override URL] ****** "+ url);
 
        String[] urlArray;
        String splitter = "://";
 
        // Split url by only 2 in the event "://" occurs elsewhere (SHOULD be impossible because you string encoded right!?) 
        urlArray = url.split(splitter,2);
 
        if (urlArray[0].equalsIgnoreCase("wizmessageview") ) {