Share via


DevicePolicyManager.GetKeepUninstalledPackages(ComponentName) Method

Definition

Get the list of apps to keep around as APKs even if no user has currently installed it.

[Android.Runtime.Register("getKeepUninstalledPackages", "(Landroid/content/ComponentName;)Ljava/util/List;", "GetGetKeepUninstalledPackages_Landroid_content_ComponentName_Handler", ApiSince=28)]
public virtual System.Collections.Generic.IList<string>? GetKeepUninstalledPackages (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("getKeepUninstalledPackages", "(Landroid/content/ComponentName;)Ljava/util/List;", "GetGetKeepUninstalledPackages_Landroid_content_ComponentName_Handler", ApiSince=28)>]
abstract member GetKeepUninstalledPackages : Android.Content.ComponentName -> System.Collections.Generic.IList<string>
override this.GetKeepUninstalledPackages : Android.Content.ComponentName -> System.Collections.Generic.IList<string>

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with, or null if the caller is a keep uninstalled packages delegate.

Returns

List of package names to keep cached.

Attributes

Remarks

Get the list of apps to keep around as APKs even if no user has currently installed it. This function can be called by a device owner or by a delegate given the #DELEGATION_KEEP_UNINSTALLED_PACKAGES scope via #setDelegatedScopes.

Please note that packages returned in this method are not automatically pre-cached.

Java documentation for android.app.admin.DevicePolicyManager.getKeepUninstalledPackages(android.content.ComponentName).

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