Share via


PackageManager.GetPreferredPackages(PackageInfoFlags) Method

Definition

Retrieve the list of all currently configured preferred packages.

[Android.Runtime.Register("getPreferredPackages", "(I)Ljava/util/List;", "GetGetPreferredPackages_IHandler")]
public abstract System.Collections.Generic.IList<Android.Content.PM.PackageInfo> GetPreferredPackages (Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getPreferredPackages", "(I)Ljava/util/List;", "GetGetPreferredPackages_IHandler")>]
abstract member GetPreferredPackages : Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>

Parameters

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

A List of PackageInfo objects, one for each preferred application, in order of preference.

Attributes

Remarks

Retrieve the list of all currently configured preferred packages. The first package on the list is the most preferred, the last is the least preferred.

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.getPreferredPackages(int).

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