語言

PackageManager.QueryIntentActivityOptions 方法

定義

多載

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

取得一組活動,應該以類似選項呈現給使用者。

[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>

參數

caller
ComponentName

提出請求的活動類別名稱。 此活動永遠不會出現在輸出清單中。 可以是 null。

specifics
Intent[]

一組意圖,應該解決到最初的具體結果。 可以是 null。

intent
Intent

根據 resolveActivity() 所期望的意圖。

flags
PackageInfoFlags

新增選項旗標以修改回傳的資料。 最重要的是 #MATCH_DEFAULT_ONLY,限制解析範圍僅包含支持該活動 android.content.Intent#CATEGORY_DEFAULT的活動。

傳回

回傳一份包含每個匹配活動一個條目的 ResolveInfo 物件清單。 清單依據 var>specifics</var> 中解決<的所有意圖排序,接著是任何能處理 <var>intent</<var> 但未被<任何 var>specific 或 var> 意念包含的額外活動。 若無匹配活動,則回傳一個空清單。

屬性

備註

取得一組活動,應該以類似選項呈現給使用者。 這類似 #queryIntentActivities,但它也允許你提供一份更明確的意圖清單,想解析到特定選項,並根據這些輸入,合理順序回傳最終的 ResolveInfo 清單,避免重複。

需要長旗時使用 #queryIntentActivityOptions(ComponentName, List, Intent, ResolveInfoFlags) 。

Java 文件 android.content.pm.PackageManager.queryIntentActivityOptions(android.content.ComponentName, android.content.Intent[], android.content.Intent, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

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>

參數

caller
ComponentName
specifics
IList<Intent>
intent
Intent

傳回

屬性

適用於