VpnService.Builder.AddDisallowedApplication(String) 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.
Adds an application denied access to the VPN.
[Android.Runtime.Register("addDisallowedApplication", "(Ljava/lang/String;)Landroid/net/VpnService$Builder;", "GetAddDisallowedApplication_Ljava_lang_String_Handler")]
public virtual Android.Net.VpnService.Builder AddDisallowedApplication(string packageName);
[<Android.Runtime.Register("addDisallowedApplication", "(Ljava/lang/String;)Landroid/net/VpnService$Builder;", "GetAddDisallowedApplication_Ljava_lang_String_Handler")>]
abstract member AddDisallowedApplication : string -> Android.Net.VpnService.Builder
override this.AddDisallowedApplication : string -> Android.Net.VpnService.Builder
Parameters
- packageName
- String
The full canonical package name of a currently installed application.
Returns
This builder.
- Attributes
Exceptions
Thrown when an allowed-application list was already configured.
Thrown when the package is not currently installed.
Remarks
Denied applications use the network as if the VPN were not running. A builder cannot contain both allowed and disallowed application lists.
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.
Java documentation for android.net.VpnService.Builder.addDisallowedApplication(java.lang.String).