Sub WebViewClient1_ShouldInterceptRequest(Url As String) As WebResourceResponse
Log("WebViewClient1_ShouldInterceptRequest: "&Url)
' in this callback you have 2 options:
' return a WebResourceResponse which the WebView will use instead of requesting the webpage resource
' return Null and the WebView will continue with it's default action requesting the webpage response
Select Url
Case "http://www.b4x.com/android/forum/data/avatars/m/38/38207.jpg?1377605759"
' this should replace Rorry's avatar with a scooby doo image!
Dim WebResourceResponse1 As WebResourceResponse
WebResourceResponse1.Initialize("image/jpeg", Null, File.OpenInput(File.DirAssets, "scooby-doo-96x96.jpg"))
Return WebResourceResponse1
Case Else
' default action - let the webView retrieve the resource
Return Null
End Select
End Sub