Share via


VpnService.OnRevoke Method

Definition

Invoked when the application is revoked.

[Android.Runtime.Register("onRevoke", "()V", "GetOnRevokeHandler")]
public virtual void OnRevoke ();
[<Android.Runtime.Register("onRevoke", "()V", "GetOnRevokeHandler")>]
abstract member OnRevoke : unit -> unit
override this.OnRevoke : unit -> unit
Attributes

Remarks

Invoked when the application is revoked. At this moment, the VPN interface is already deactivated by the system. The application should close the file descriptor and shut down gracefully. The default implementation of this method is calling Service#stopSelf().

<p class="note">Calls to this method may not happen on the main thread of the process.

Java documentation for android.net.VpnService.onRevoke().

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

See also