PackageManager.ResolveService 方法

定义

重载

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

返回

属性

适用于