PackageManager.SetApplicationEnabledSetting Method

Definition

Set the enabled setting for an application This setting will override any enabled state which may have been set by the application in its manifest.

[Android.Runtime.Register("setApplicationEnabledSetting", "(Ljava/lang/String;II)V", "GetSetApplicationEnabledSetting_Ljava_lang_String_IIHandler")]
[Android.Runtime.RequiresPermission("android.permission.CHANGE_COMPONENT_ENABLED_STATE")]
public abstract void SetApplicationEnabledSetting (string packageName, Android.Content.PM.ComponentEnabledState newState, Android.Content.PM.ComponentEnableOption flags);
[<Android.Runtime.Register("setApplicationEnabledSetting", "(Ljava/lang/String;II)V", "GetSetApplicationEnabledSetting_Ljava_lang_String_IIHandler")>]
[<Android.Runtime.RequiresPermission("android.permission.CHANGE_COMPONENT_ENABLED_STATE")>]
abstract member SetApplicationEnabledSetting : string * Android.Content.PM.ComponentEnabledState * Android.Content.PM.ComponentEnableOption -> unit

Parameters

packageName
String

The package name of the application to enable

newState
ComponentEnabledState

The new enabled state for the application.

flags
ComponentEnableOption

Optional behavior flags.

Attributes

Remarks

Set the enabled setting for an application This setting will override any enabled state which may have been set by the application in its manifest. It also overrides the enabled state set in the manifest for any of the application's components. It does not override any enabled state set by #setComponentEnabledSetting for any of the application's components.

Java documentation for android.content.pm.PackageManager.setApplicationEnabledSetting(java.lang.String, int, int).

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