Share via


PackageManager.ClearPackagePreferredActivities(String) Method

Definition

Remove all preferred activity mappings, previously added with #addPreferredActivity, from the system whose activities are implemented in the given package name.

[Android.Runtime.Register("clearPackagePreferredActivities", "(Ljava/lang/String;)V", "GetClearPackagePreferredActivities_Ljava_lang_String_Handler")]
public abstract void ClearPackagePreferredActivities (string packageName);
[<Android.Runtime.Register("clearPackagePreferredActivities", "(Ljava/lang/String;)V", "GetClearPackagePreferredActivities_Ljava_lang_String_Handler")>]
abstract member ClearPackagePreferredActivities : string -> unit

Parameters

packageName
String

The name of the package whose preferred activity mappings are to be removed.

Attributes

Remarks

Remove all preferred activity mappings, previously added with #addPreferredActivity, from the system whose activities are implemented in the given package name. An application can only clear its own package(s).

This member is deprecated. This function no longer does anything. It is the platform's responsibility to assign preferred activities and this cannot be modified directly. To determine the activities resolved by the platform, use #resolveActivity or #queryIntentActivities. To configure an app to be responsible for a particular role and to check current role holders, see android.app.role.RoleManager.

Java documentation for android.content.pm.PackageManager.clearPackagePreferredActivities(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