Android Guides | Samples

Android.Webkit.WebViewClient.ShouldInterceptRequest Method

Notify the host application of a resource request and allow the application to return the data.

Syntax

[Android.Runtime.Register("shouldInterceptRequest", "(Landroid/webkit/WebView;Ljava/lang/String;)Landroid/webkit/WebResourceResponse;", "GetShouldInterceptRequest_Landroid_webkit_WebView_Ljava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public virtual WebResourceResponse ShouldInterceptRequest (WebView view, String url)

Parameters

view
The WebView that is requesting the resource.
url
The raw url of the resource.

Remarks

Notify the host application of a resource request and allow the application to return the data. If the return value is null, the WebView will continue to load the resource as usual. Otherwise, the return response and data will be used. NOTE: This method is called on a thread other than the UI thread so clients should exercise caution when accessing private data or the view system.

[Android Documentation]

Requirements

Namespace: Android.Webkit
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11