다음을 통해 공유


DevicePolicyManager.SetOverrideApnsEnabled(ComponentName, Boolean) Method

Definition

Called by device owner to set if override APNs should be enabled.

[Android.Runtime.Register("setOverrideApnsEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetOverrideApnsEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=28)]
public virtual void SetOverrideApnsEnabled (Android.Content.ComponentName admin, bool enabled);
[<Android.Runtime.Register("setOverrideApnsEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetOverrideApnsEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=28)>]
abstract member SetOverrideApnsEnabled : Android.Content.ComponentName * bool -> unit
override this.SetOverrideApnsEnabled : Android.Content.ComponentName * bool -> unit

Parameters

admin
ComponentName

which DeviceAdminReceiver this request is associated with

enabled
Boolean

true if override APNs should be enabled, false otherwise

Attributes

Remarks

Called by device owner to set if override APNs should be enabled.

Override APNs are separated from other APNs on the device, and can only be inserted or modified by the device owner. When enabled, only override APNs are in use, any other APNs are ignored.

Note: Enterprise APNs added by managed profile owners do not need to be enabled by this API. They are part of the preferential network service config and is controlled by #setPreferentialNetworkServiceConfigs.

Java documentation for android.app.admin.DevicePolicyManager.setOverrideApnsEnabled(android.content.ComponentName, 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