Compartir a través de


PackageManager.QueryIntentActivityOptions Method

Definition

Overloads

QueryIntentActivityOptions(ComponentName, Intent[], Intent, PackageInfoFlags)

Retrieve a set of activities that should be presented to the user as similar options.

QueryIntentActivityOptions(ComponentName, IList<Intent>, Intent, PackageInfoFlags)

QueryIntentActivityOptions(ComponentName, Intent[], Intent, PackageInfoFlags)

Retrieve a set of activities that should be presented to the user as similar options.

[Android.Runtime.Register("queryIntentActivityOptions", "(Landroid/content/ComponentName;[Landroid/content/Intent;Landroid/content/Intent;I)Ljava/util/List;", "GetQueryIntentActivityOptions_Landroid_content_ComponentName_arrayLandroid_content_Intent_Landroid_content_Intent_IHandler")]
public abstract System.Collections.Generic.IList<Android.Content.PM.ResolveInfo> QueryIntentActivityOptions (Android.Content.ComponentName? caller, Android.Content.Intent[]? specifics, Android.Content.Intent intent, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("queryIntentActivityOptions", "(Landroid/content/ComponentName;[Landroid/content/Intent;Landroid/content/Intent;I)Ljava/util/List;", "GetQueryIntentActivityOptions_Landroid_content_ComponentName_arrayLandroid_content_Intent_Landroid_content_Intent_IHandler")>]
abstract member QueryIntentActivityOptions : Android.Content.ComponentName * Android.Content.Intent[] * Android.Content.Intent * Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ResolveInfo>

Parameters

caller
ComponentName

The class name of the activity that is making the request. This activity will never appear in the output list. Can be null.

specifics
Intent[]

An array of Intents that should be resolved to the first specific results. Can be null.

intent
Intent

The desired intent as per resolveActivity().

flags
PackageInfoFlags

Additional option flags to modify the data returned. The most important is #MATCH_DEFAULT_ONLY, to limit the resolution to only those activities that support the android.content.Intent#CATEGORY_DEFAULT.

Returns

Returns a List of ResolveInfo objects containing one entry for each matching activity. The list is ordered first by all of the intents resolved in <var>specifics</var> and then any additional activities that can handle <var>intent</var> but did not get included by one of the <var>specifics</var> intents. If there are no matching activities, an empty list is returned.

Attributes

Remarks

Retrieve a set of activities that should be presented to the user as similar options. This is like #queryIntentActivities, except it also allows you to supply a list of more explicit Intents that you would like to resolve to particular options, and takes care of returning the final ResolveInfo list in a reasonable order, with no duplicates, based on those inputs.

Use #queryIntentActivityOptions(ComponentName, List, Intent, ResolveInfoFlags) when long flags are needed.

Java documentation for android.content.pm.PackageManager.queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, 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

QueryIntentActivityOptions(ComponentName, IList<Intent>, Intent, PackageInfoFlags)

[Android.Runtime.Register("queryIntentActivityOptions", "(Landroid/content/ComponentName;Ljava/util/List;Landroid/content/Intent;I)Ljava/util/List;", "GetQueryIntentActivityOptions_Landroid_content_ComponentName_Ljava_util_List_Landroid_content_Intent_IHandler", ApiSince=33)]
public virtual System.Collections.Generic.IList<Android.Content.PM.ResolveInfo> QueryIntentActivityOptions (Android.Content.ComponentName? caller, System.Collections.Generic.IList<Android.Content.Intent>? specifics, Android.Content.Intent intent, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("queryIntentActivityOptions", "(Landroid/content/ComponentName;Ljava/util/List;Landroid/content/Intent;I)Ljava/util/List;", "GetQueryIntentActivityOptions_Landroid_content_ComponentName_Ljava_util_List_Landroid_content_Intent_IHandler", ApiSince=33)>]
abstract member QueryIntentActivityOptions : Android.Content.ComponentName * System.Collections.Generic.IList<Android.Content.Intent> * Android.Content.Intent * Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ResolveInfo>
override this.QueryIntentActivityOptions : Android.Content.ComponentName * System.Collections.Generic.IList<Android.Content.Intent> * Android.Content.Intent * Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ResolveInfo>

Parameters

caller
ComponentName
specifics
IList<Intent>
intent
Intent

Returns

Attributes

Applies to