Udostępnij za pośrednictwem


DevicePolicyManager.GetAlwaysOnVpnPackage(ComponentName) Method

Definition

Called by a device or profile owner to read the name of the package administering an always-on VPN connection for the current user.

[Android.Runtime.Register("getAlwaysOnVpnPackage", "(Landroid/content/ComponentName;)Ljava/lang/String;", "GetGetAlwaysOnVpnPackage_Landroid_content_ComponentName_Handler", ApiSince=24)]
public virtual string? GetAlwaysOnVpnPackage (Android.Content.ComponentName admin);
[<Android.Runtime.Register("getAlwaysOnVpnPackage", "(Landroid/content/ComponentName;)Ljava/lang/String;", "GetGetAlwaysOnVpnPackage_Landroid_content_ComponentName_Handler", ApiSince=24)>]
abstract member GetAlwaysOnVpnPackage : Android.Content.ComponentName -> string
override this.GetAlwaysOnVpnPackage : Android.Content.ComponentName -> string

Parameters

Returns

Package name of VPN controller responsible for always-on VPN, or null if none is set.

Attributes

Remarks

Called by a device or profile owner to read the name of the package administering an always-on VPN connection for the current user. If there is no such package, or the always-on VPN is provided by the system instead of by an application, null will be returned.

Java documentation for android.app.admin.DevicePolicyManager.getAlwaysOnVpnPackage(android.content.ComponentName).

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