共用方式為


PackageInstaller.UninstallExistingPackage(String, IntentSender) Method

Definition

Uninstall the given package for the user for which this installer was created if the package will still exist for other users on the device.

[Android.Runtime.Register("uninstallExistingPackage", "(Ljava/lang/String;Landroid/content/IntentSender;)V", "GetUninstallExistingPackage_Ljava_lang_String_Landroid_content_IntentSender_Handler", ApiSince=31)]
[Android.Runtime.RequiresPermission("android.permission.DELETE_PACKAGES")]
public virtual void UninstallExistingPackage (string packageName, Android.Content.IntentSender? statusReceiver);
[<Android.Runtime.Register("uninstallExistingPackage", "(Ljava/lang/String;Landroid/content/IntentSender;)V", "GetUninstallExistingPackage_Ljava_lang_String_Landroid_content_IntentSender_Handler", ApiSince=31)>]
[<Android.Runtime.RequiresPermission("android.permission.DELETE_PACKAGES")>]
abstract member UninstallExistingPackage : string * Android.Content.IntentSender -> unit
override this.UninstallExistingPackage : 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 for the user for which this installer was created if the package will still exist for other users on the device.

Java documentation for android.content.pm.PackageInstaller.uninstallExistingPackage(java.lang.String, android.content.IntentSender).

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