Share via


DevicePolicyManager.PreferentialNetworkServiceEnabled Property

Definition

Indicates whether preferential network service is enabled. -or- Sets whether preferential network service is enabled.

public virtual bool PreferentialNetworkServiceEnabled { [Android.Runtime.Register("isPreferentialNetworkServiceEnabled", "()Z", "GetIsPreferentialNetworkServiceEnabledHandler", ApiSince=31)] get; [Android.Runtime.Register("setPreferentialNetworkServiceEnabled", "(Z)V", "GetSetPreferentialNetworkServiceEnabled_ZHandler", ApiSince=31)] set; }
[<get: Android.Runtime.Register("isPreferentialNetworkServiceEnabled", "()Z", "GetIsPreferentialNetworkServiceEnabledHandler", ApiSince=31)>]
[<set: Android.Runtime.Register("setPreferentialNetworkServiceEnabled", "(Z)V", "GetSetPreferentialNetworkServiceEnabled_ZHandler", ApiSince=31)>]
member this.PreferentialNetworkServiceEnabled : bool with get, set

Property Value

whether preferential network service is enabled.

Attributes

Remarks

Property getter documentation:

Indicates whether preferential network service is enabled.

Before Android version android.os.Build.VERSION_CODES#TIRAMISU: This method can be called by the profile owner of a managed profile.

Starting from Android version android.os.Build.VERSION_CODES#TIRAMISU: This method can be called by the profile owner of a managed profile or device owner.

Java documentation for android.app.admin.DevicePolicyManager.isPreferentialNetworkServiceEnabled().

Property setter documentation:

Sets whether preferential network service is enabled. For example, an organization can have a deal/agreement with a carrier that all of the work data from its employees’ devices will be sent via a network service dedicated for enterprise use.

An example of a supported preferential network service is the Enterprise slice on 5G networks. For devices on 4G networks, the profile owner needs to additionally configure enterprise APN to set up data call for the preferential network service. These APNs can be added using #addOverrideApn.

By default, preferential network service is disabled on the work profile and fully managed devices, on supported carriers and devices. Admins can explicitly enable it with this API.

This method enables preferential network service with a default configuration. To fine-tune the configuration, use #setPreferentialNetworkServiceConfigs) instead. <p> Before Android version {@link android.os.Build.VERSION_CODES#TIRAMISU: this method can be called by the profile owner of a managed profile.

Starting from Android version android.os.Build.VERSION_CODES#TIRAMISU: This method can be called by the profile owner of a managed profile or device owner.

Java documentation for android.app.admin.DevicePolicyManager.setPreferentialNetworkServiceEnabled(boolean).

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