Share via


DevicePolicyManager.EnableSystemApp Method

Definition

Overloads

EnableSystemApp(ComponentName, Intent)

Re-enable system apps by intent that were disabled by default when the user was initialized.

EnableSystemApp(ComponentName, String)

Re-enable a system app that was disabled by default when the user was initialized.

EnableSystemApp(ComponentName, Intent)

Re-enable system apps by intent that were disabled by default when the user was initialized.

[Android.Runtime.Register("enableSystemApp", "(Landroid/content/ComponentName;Landroid/content/Intent;)I", "GetEnableSystemApp_Landroid_content_ComponentName_Landroid_content_Intent_Handler")]
public virtual int EnableSystemApp (Android.Content.ComponentName admin, Android.Content.Intent? intent);
[<Android.Runtime.Register("enableSystemApp", "(Landroid/content/ComponentName;Landroid/content/Intent;)I", "GetEnableSystemApp_Landroid_content_ComponentName_Landroid_content_Intent_Handler")>]
abstract member EnableSystemApp : Android.Content.ComponentName * Android.Content.Intent -> int
override this.EnableSystemApp : Android.Content.ComponentName * Android.Content.Intent -> int

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with, or null if the caller is an enable system app delegate.

intent
Intent

An intent matching the app(s) to be installed. All apps that resolve for this intent will be re-enabled in the calling profile.

Returns

int The number of activities that matched the intent and were installed.

Attributes

Remarks

Re-enable system apps by intent that were disabled by default when the user was initialized. This function can be called by a device owner, profile owner, or by a delegate given the #DELEGATION_ENABLE_SYSTEM_APP scope via #setDelegatedScopes.

Java documentation for android.app.admin.DevicePolicyManager.enableSystemApp(android.content.ComponentName, android.content.Intent).

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

EnableSystemApp(ComponentName, String)

Re-enable a system app that was disabled by default when the user was initialized.

[Android.Runtime.Register("enableSystemApp", "(Landroid/content/ComponentName;Ljava/lang/String;)V", "GetEnableSystemApp_Landroid_content_ComponentName_Ljava_lang_String_Handler")]
public virtual void EnableSystemApp (Android.Content.ComponentName admin, string? packageName);
[<Android.Runtime.Register("enableSystemApp", "(Landroid/content/ComponentName;Ljava/lang/String;)V", "GetEnableSystemApp_Landroid_content_ComponentName_Ljava_lang_String_Handler")>]
abstract member EnableSystemApp : Android.Content.ComponentName * string -> unit
override this.EnableSystemApp : Android.Content.ComponentName * string -> unit

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with, or null if the caller is an enable system app delegate.

packageName
String

The package to be re-enabled in the calling profile.

Attributes

Remarks

Re-enable a system app that was disabled by default when the user was initialized. This function can be called by a device owner, profile owner, or by a delegate given the #DELEGATION_ENABLE_SYSTEM_APP scope via #setDelegatedScopes.

Java documentation for android.app.admin.DevicePolicyManager.enableSystemApp(android.content.ComponentName, java.lang.String).

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