ConnectivityManager.NetworkCallback.OnUnavailable 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.
If the callback was registered with one of the requestNetwork
methods, this will
be called if no network is found within the timeout specified in #requestNetwork(NetworkRequest, NetworkCallback, int)
call or if the requested network
request cannot be fulfilled (whether or not a timeout was specified).
[Android.Runtime.Register("onUnavailable", "()V", "GetOnUnavailableHandler", ApiSince=26)]
public virtual void OnUnavailable();
[<Android.Runtime.Register("onUnavailable", "()V", "GetOnUnavailableHandler", ApiSince=26)>]
abstract member OnUnavailable : unit -> unit
override this.OnUnavailable : unit -> unit
- Attributes
Remarks
If the callback was registered with one of the requestNetwork
methods, this will be called if no network is found within the timeout specified in #requestNetwork(NetworkRequest, NetworkCallback, int)
call or if the requested network request cannot be fulfilled (whether or not a timeout was specified).
If the callback was registered when reserving a network, this method indicates that the reservation is removed. It can be called when the reservation is requested, because the system could not satisfy the reservation, or after the reserved network connects.
When this callback is invoked the associated NetworkRequest
will have already been removed and released, as if #unregisterNetworkCallback(NetworkCallback)
had been called.
Java documentation for android.net.ConnectivityManager.NetworkCallback.onUnavailable()
.
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.