Share via


WebView.SetNetworkAvailable(Boolean) Method

Definition

Informs WebView of the network state.

[Android.Runtime.Register("setNetworkAvailable", "(Z)V", "GetSetNetworkAvailable_ZHandler")]
public virtual void SetNetworkAvailable (bool networkUp);
[<Android.Runtime.Register("setNetworkAvailable", "(Z)V", "GetSetNetworkAvailable_ZHandler")>]
abstract member SetNetworkAvailable : bool -> unit
override this.SetNetworkAvailable : bool -> unit

Parameters

networkUp
Boolean

a boolean indicating if network is available

Attributes

Remarks

Informs WebView of the network state. This is used to set the JavaScript property window.navigator.isOnline and generates the online/offline event as specified in HTML5, sec. 5.7.7

Java documentation for android.webkit.WebView.setNetworkAvailable(boolean).

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.

Applies to