PackageInstaller.Uninstall 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.
Overloads
Uninstall(VersionedPackage, IntentSender) |
Uninstall the given package with a specific version code, removing it completely from the device. |
Uninstall(String, IntentSender) |
Uninstall the given package, removing it completely from the device. |
Uninstall(VersionedPackage, Int32, IntentSender) |
Uninstall the given package with a specific version code, removing it completely from the device. |
Uninstall(VersionedPackage, IntentSender)
Uninstall the given package with a specific version code, removing it completely from the device.
[Android.Runtime.Register("uninstall", "(Landroid/content/pm/VersionedPackage;Landroid/content/IntentSender;)V", "GetUninstall_Landroid_content_pm_VersionedPackage_Landroid_content_IntentSender_Handler", ApiSince=26)]
public virtual void Uninstall (Android.Content.PM.VersionedPackage versionedPackage, Android.Content.IntentSender statusReceiver);
[<Android.Runtime.Register("uninstall", "(Landroid/content/pm/VersionedPackage;Landroid/content/IntentSender;)V", "GetUninstall_Landroid_content_pm_VersionedPackage_Landroid_content_IntentSender_Handler", ApiSince=26)>]
abstract member Uninstall : Android.Content.PM.VersionedPackage * Android.Content.IntentSender -> unit
override this.Uninstall : Android.Content.PM.VersionedPackage * Android.Content.IntentSender -> unit
Parameters
- versionedPackage
- VersionedPackage
The versioned package to uninstall.
- statusReceiver
- IntentSender
Where to deliver the result of the operation indicated by the extra
#EXTRA_STATUS
. Refer to the individual status codes
on how to handle them.
- Attributes
Remarks
Uninstall the given package with a specific version code, removing it completely from the device. If the version code of the package does not match the one passed in the versioned package argument this method is a no-op. Use PackageManager#VERSION_CODE_HIGHEST
to uninstall the latest version of the package.
This method is available to: <ul> <li>the current "installer of record" for the package <li>the device owner <li>the affiliated profile owner </ul>
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
Uninstall(String, IntentSender)
Uninstall the given package, removing it completely from the device.
[Android.Runtime.Register("uninstall", "(Ljava/lang/String;Landroid/content/IntentSender;)V", "GetUninstall_Ljava_lang_String_Landroid_content_IntentSender_Handler")]
public virtual void Uninstall (string packageName, Android.Content.IntentSender statusReceiver);
[<Android.Runtime.Register("uninstall", "(Ljava/lang/String;Landroid/content/IntentSender;)V", "GetUninstall_Ljava_lang_String_Landroid_content_IntentSender_Handler")>]
abstract member Uninstall : string * Android.Content.IntentSender -> unit
override this.Uninstall : string * Android.Content.IntentSender -> unit
Parameters
- packageName
- String
The package to uninstall.
- statusReceiver
- IntentSender
Where to deliver the result of the operation indicated by the extra
#EXTRA_STATUS
. Refer to the individual status codes
on how to handle them.
- Attributes
Remarks
Uninstall the given package, removing it completely from the device. This method is available to: <ul> <li>the current "installer of record" for the package <li>the device owner <li>the affiliated profile owner </ul>
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
Uninstall(VersionedPackage, Int32, IntentSender)
Uninstall the given package with a specific version code, removing it completely from the device.
[Android.Runtime.Register("uninstall", "(Landroid/content/pm/VersionedPackage;ILandroid/content/IntentSender;)V", "GetUninstall_Landroid_content_pm_VersionedPackage_ILandroid_content_IntentSender_Handler", ApiSince=34)]
public virtual void Uninstall (Android.Content.PM.VersionedPackage versionedPackage, int flags, Android.Content.IntentSender statusReceiver);
[<Android.Runtime.Register("uninstall", "(Landroid/content/pm/VersionedPackage;ILandroid/content/IntentSender;)V", "GetUninstall_Landroid_content_pm_VersionedPackage_ILandroid_content_IntentSender_Handler", ApiSince=34)>]
abstract member Uninstall : Android.Content.PM.VersionedPackage * int * Android.Content.IntentSender -> unit
override this.Uninstall : Android.Content.PM.VersionedPackage * int * Android.Content.IntentSender -> unit
Parameters
- versionedPackage
- VersionedPackage
The versioned package to uninstall.
- flags
- Int32
Flags for uninstall.
- statusReceiver
- IntentSender
Where to deliver the result of the operation indicated by the extra
#EXTRA_STATUS
. Refer to the individual status codes
on how to handle them.
- Attributes
Remarks
Uninstall the given package with a specific version code, removing it completely from the device. This method is only available to the current "installer of record" for the package. If the version code of the package does not match the one passed in the versioned package argument this method is a no-op. Use PackageManager#VERSION_CODE_HIGHEST
to uninstall the latest version of the package.
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.