PackageManager.ResolveService 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ResolveService(Intent, PackageInfoFlags) |
判斷要針對指定意圖處理的最佳服務。 |
ResolveService(Intent, PackageManager+ResolveInfoFlags) |
ResolveService(Intent, PackageInfoFlags)
判斷要針對指定意圖處理的最佳服務。
[Android.Runtime.Register("resolveService", "(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;", "GetResolveService_Landroid_content_Intent_IHandler")]
public abstract Android.Content.PM.ResolveInfo? ResolveService (Android.Content.Intent intent, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("resolveService", "(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;", "GetResolveService_Landroid_content_Intent_IHandler")>]
abstract member ResolveService : Android.Content.Intent * Android.Content.PM.PackageInfoFlags -> Android.Content.PM.ResolveInfo
參數
- intent
- Intent
包含所有所需規格的意圖(動作、數據、類型、類別和/或元件)。
- flags
- PackageInfoFlags
其他選項旗標可修改傳回的數據。
傳回
會傳回 ResolveInfo 物件,其中包含最終判斷為最佳動作的服務意圖。 如果找不到相符的服務,則傳回 null。
- 屬性
備註
判斷要針對指定意圖處理的最佳服務。
需要長旗標時使用 #resolveService(Intent, ResolveInfoFlags)
。
的 android.content.pm.PackageManager.resolveService(android.content.Intent, int)
Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
ResolveService(Intent, PackageManager+ResolveInfoFlags)
[Android.Runtime.Register("resolveService", "(Landroid/content/Intent;Landroid/content/pm/PackageManager$ResolveInfoFlags;)Landroid/content/pm/ResolveInfo;", "GetResolveService_Landroid_content_Intent_Landroid_content_pm_PackageManager_ResolveInfoFlags_Handler", ApiSince=33)]
public virtual Android.Content.PM.ResolveInfo? ResolveService (Android.Content.Intent intent, Android.Content.PM.PackageManager.ResolveInfoFlags flags);
[<Android.Runtime.Register("resolveService", "(Landroid/content/Intent;Landroid/content/pm/PackageManager$ResolveInfoFlags;)Landroid/content/pm/ResolveInfo;", "GetResolveService_Landroid_content_Intent_Landroid_content_pm_PackageManager_ResolveInfoFlags_Handler", ApiSince=33)>]
abstract member ResolveService : Android.Content.Intent * Android.Content.PM.PackageManager.ResolveInfoFlags -> Android.Content.PM.ResolveInfo
override this.ResolveService : Android.Content.Intent * Android.Content.PM.PackageManager.ResolveInfoFlags -> Android.Content.PM.ResolveInfo
參數
- intent
- Intent
傳回
- 屬性