WebView.SetSafeBrowsingWhitelist(IList<String>, IValueCallback) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks.
[Android.Runtime.Register("setSafeBrowsingWhitelist", "(Ljava/util/List;Landroid/webkit/ValueCallback;)V", "", ApiSince=27)]
public static void SetSafeBrowsingWhitelist (System.Collections.Generic.IList<string> hosts, Android.Webkit.IValueCallback? callback);
[<Android.Runtime.Register("setSafeBrowsingWhitelist", "(Ljava/util/List;Landroid/webkit/ValueCallback;)V", "", ApiSince=27)>]
static member SetSafeBrowsingWhitelist : System.Collections.Generic.IList<string> * Android.Webkit.IValueCallback -> unit
Parameters
- callback
- IValueCallback
will be called with true
if hosts are successfully added to the
allowlist. It will be called with false
if any hosts are malformed. The callback
will be run on the UI thread
- Attributes
Remarks
Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks. The list is global for all the WebViews.
Each rule should take one of these: <table> <tr><th> Rule </th> <th> Example </th> <th> Matches Subdomain</th> </tr> <tr><td> HOSTNAME </td> <td> example.com </td> <td> Yes </td> </tr> <tr><td> .HOSTNAME </td> <td> .example.com </td> <td> No </td> </tr> <tr><td> IPV4_LITERAL </td> <td> 192.168.1.1 </td> <td> No </td></tr> <tr><td> IPV6_LITERAL_WITH_BRACKETS </td><td>[10:20:30:40:50:60:70:80]</td><td>No</td></tr> </table>
All other rules, including wildcards, are invalid.
The correct syntax for hosts is defined by RFC 3986.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.