ConnectivityManager.NetworkCallback.OnReserved(NetworkCapabilities) 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.
Called when a network is reserved.
[Android.Runtime.Register("onReserved", "(Landroid/net/NetworkCapabilities;)V", "GetOnReserved_Landroid_net_NetworkCapabilities_Handler", ApiSince=36)]
public virtual void OnReserved(Android.Net.NetworkCapabilities networkCapabilities);
[<Android.Runtime.Register("onReserved", "(Landroid/net/NetworkCapabilities;)V", "GetOnReserved_Landroid_net_NetworkCapabilities_Handler", ApiSince=36)>]
abstract member OnReserved : Android.Net.NetworkCapabilities -> unit
override this.OnReserved : Android.Net.NetworkCapabilities -> unit
Parameters
- networkCapabilities
- NetworkCapabilities
The NetworkCapabilities
of the reservation.
- Attributes
Remarks
Called when a network is reserved.
The reservation includes the NetworkCapabilities
that uniquely describe the network that was reserved. the caller communicates this information to hardware or software components on or off-device to instruct them to create a network matching this reservation.
#onReserved(NetworkCapabilities)
is called at most once and is guaranteed to be called before any other callback unless the reservation is unavailable.
Once a reservation is made, the reserved NetworkCapabilities
will not be updated, and the reservation remains in place until the reserved network connects or #onUnavailable
is called.
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.