DevicePolicyManager.SetKeepUninstalledPackages Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set a list of apps to keep around as APKs even if no user has currently installed it.
[Android.Runtime.Register("setKeepUninstalledPackages", "(Landroid/content/ComponentName;Ljava/util/List;)V", "GetSetKeepUninstalledPackages_Landroid_content_ComponentName_Ljava_util_List_Handler", ApiSince=28)]
public virtual void SetKeepUninstalledPackages (Android.Content.ComponentName? admin, System.Collections.Generic.IList<string> packageNames);
[<Android.Runtime.Register("setKeepUninstalledPackages", "(Landroid/content/ComponentName;Ljava/util/List;)V", "GetSetKeepUninstalledPackages_Landroid_content_ComponentName_Ljava_util_List_Handler", ApiSince=28)>]
abstract member SetKeepUninstalledPackages : Android.Content.ComponentName * System.Collections.Generic.IList<string> -> unit
override this.SetKeepUninstalledPackages : Android.Content.ComponentName * System.Collections.Generic.IList<string> -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with, or
null
if the caller is a keep uninstalled packages delegate.
- Attributes
Remarks
Set a 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 setting this policy does not imply that specified apps will be automatically pre-cached.
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.