NetworkSecurityPolicy.Builder Constructors
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.
Overloads
| Name | Description |
|---|---|
| NetworkSecurityPolicy.Builder(Context) |
Creates a builder for the network security policy. |
| NetworkSecurityPolicy.Builder(Context, Boolean) |
Creates a builder for the network security policy. |
NetworkSecurityPolicy.Builder(Context)
Creates a builder for the network security policy.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "", ApiSince=37)]
public Builder(Android.Content.Context appContext);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "", ApiSince=37)>]
new Android.Security.NetworkSecurityPolicy.Builder : Android.Content.Context -> Android.Security.NetworkSecurityPolicy.Builder
Parameters
- appContext
- Context
the application Context. Must not be null.
- Attributes
Remarks
Creates a builder for the network security policy. The builder is initialized with default values of the app's SDK target level.
Android reference for android.security.NetworkSecurityPolicy.Builder.Builder.
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
NetworkSecurityPolicy.Builder(Context, Boolean)
Creates a builder for the network security policy.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Z)V", "", ApiSince=37)]
public Builder(Android.Content.Context appContext, bool inheritNetworkSecurityConfig);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Z)V", "", ApiSince=37)>]
new Android.Security.NetworkSecurityPolicy.Builder : Android.Content.Context * bool -> Android.Security.NetworkSecurityPolicy.Builder
Parameters
- appContext
- Context
the application Context. Must not be null.
- inheritNetworkSecurityConfig
- Boolean
if true, initialize the builder with the content of the app's network security config. If false, initialize the builder with the default values of the app's SDK level.
- Attributes
Remarks
Creates a builder for the network security policy. The builder is initialized with either the content of the app's Network Security Config XML, or with the default values of the app's SDK target level.
Android reference for android.security.NetworkSecurityPolicy.Builder.Builder.
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.