ConnectivityManager.RequestNetwork Method

Definition

Overloads

RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback, Handler, Int32)
RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback, Int32)
RequestNetwork(NetworkRequest, PendingIntent)
RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback)

Request a network to satisfy a set of NetworkCapabilities.

RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback, Handler)

RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback, Handler, Int32)

[Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;Landroid/os/Handler;I)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_Landroid_os_Handler_IHandler", ApiSince=26)]
public virtual void RequestNetwork (Android.Net.NetworkRequest request, Android.Net.ConnectivityManager.NetworkCallback networkCallback, Android.OS.Handler handler, int timeoutMs);
[<Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;Landroid/os/Handler;I)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_Landroid_os_Handler_IHandler", ApiSince=26)>]
abstract member RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback * Android.OS.Handler * int -> unit
override this.RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback * Android.OS.Handler * int -> unit

Parameters

request
NetworkRequest
handler
Handler
timeoutMs
Int32
Attributes

Remarks

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

RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback, Int32)

[Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;I)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_IHandler", ApiSince=26)]
public virtual void RequestNetwork (Android.Net.NetworkRequest request, Android.Net.ConnectivityManager.NetworkCallback networkCallback, int timeoutMs);
[<Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;I)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_IHandler", ApiSince=26)>]
abstract member RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback * int -> unit
override this.RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback * int -> unit

Parameters

request
NetworkRequest
timeoutMs
Int32
Attributes

Remarks

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

RequestNetwork(NetworkRequest, PendingIntent)

[Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/app/PendingIntent;)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_app_PendingIntent_Handler", ApiSince=22)]
public virtual void RequestNetwork (Android.Net.NetworkRequest request, Android.App.PendingIntent operation);
[<Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/app/PendingIntent;)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_app_PendingIntent_Handler", ApiSince=22)>]
abstract member RequestNetwork : Android.Net.NetworkRequest * Android.App.PendingIntent -> unit
override this.RequestNetwork : Android.Net.NetworkRequest * Android.App.PendingIntent -> unit

Parameters

request
NetworkRequest
operation
PendingIntent
Attributes

Remarks

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

RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback)

Request a network to satisfy a set of NetworkCapabilities.

[Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_Handler")]
public virtual void RequestNetwork (Android.Net.NetworkRequest request, Android.Net.ConnectivityManager.NetworkCallback networkCallback);
[<Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_Handler")>]
abstract member RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback -> unit
override this.RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback -> unit

Parameters

request
NetworkRequest

NetworkRequest describing this request.

networkCallback
ConnectivityManager.NetworkCallback

The ConnectivityManager.NetworkCallback to be utilized for this request. Note the callback must not be shared - they uniquely specify this request.

Attributes

Exceptions

if request specifies any mutable NetworkCapabilities.

Remarks

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

RequestNetwork(NetworkRequest, ConnectivityManager+NetworkCallback, Handler)

[Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;Landroid/os/Handler;)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_Landroid_os_Handler_Handler", ApiSince=26)]
public virtual void RequestNetwork (Android.Net.NetworkRequest request, Android.Net.ConnectivityManager.NetworkCallback networkCallback, Android.OS.Handler handler);
[<Android.Runtime.Register("requestNetwork", "(Landroid/net/NetworkRequest;Landroid/net/ConnectivityManager$NetworkCallback;Landroid/os/Handler;)V", "GetRequestNetwork_Landroid_net_NetworkRequest_Landroid_net_ConnectivityManager_NetworkCallback_Landroid_os_Handler_Handler", ApiSince=26)>]
abstract member RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback * Android.OS.Handler -> unit
override this.RequestNetwork : Android.Net.NetworkRequest * Android.Net.ConnectivityManager.NetworkCallback * Android.OS.Handler -> unit

Parameters

request
NetworkRequest
handler
Handler
Attributes

Remarks

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