PackageManager.GetServiceInfo 方法

定义

重载

GetServiceInfo(ComponentName, PackageInfoFlags)

检索有关特定服务类的所有信息。

GetServiceInfo(ComponentName, PackageManager+ComponentInfoFlags)

GetServiceInfo(ComponentName, PackageInfoFlags)

检索有关特定服务类的所有信息。

[Android.Runtime.Register("getServiceInfo", "(Landroid/content/ComponentName;I)Landroid/content/pm/ServiceInfo;", "GetGetServiceInfo_Landroid_content_ComponentName_IHandler")]
public abstract Android.Content.PM.ServiceInfo GetServiceInfo (Android.Content.ComponentName component, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getServiceInfo", "(Landroid/content/ComponentName;I)Landroid/content/pm/ServiceInfo;", "GetGetServiceInfo_Landroid_content_ComponentName_IHandler")>]
abstract member GetServiceInfo : Android.Content.ComponentName * Android.Content.PM.PackageInfoFlags -> Android.Content.PM.ServiceInfo

参数

component
ComponentName

完整组件名称 (i.e. com.google.apps.media/com.google.apps.media. media.Service 类的 BackgroundPlayback。

flags
PackageInfoFlags

用于修改返回的数据的其他选项标志。

返回

包含 ServiceInfo 有关服务的信息的对象。

属性

例外

注解

检索有关特定服务类的所有信息。

需要长标志时使用 #getServiceInfo(ComponentName, ComponentInfoFlags)

适用于 . 的 android.content.pm.PackageManager.getServiceInfo(android.content.ComponentName, int)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于

GetServiceInfo(ComponentName, PackageManager+ComponentInfoFlags)

[Android.Runtime.Register("getServiceInfo", "(Landroid/content/ComponentName;Landroid/content/pm/PackageManager$ComponentInfoFlags;)Landroid/content/pm/ServiceInfo;", "GetGetServiceInfo_Landroid_content_ComponentName_Landroid_content_pm_PackageManager_ComponentInfoFlags_Handler", ApiSince=33)]
public virtual Android.Content.PM.ServiceInfo GetServiceInfo (Android.Content.ComponentName component, Android.Content.PM.PackageManager.ComponentInfoFlags flags);
[<Android.Runtime.Register("getServiceInfo", "(Landroid/content/ComponentName;Landroid/content/pm/PackageManager$ComponentInfoFlags;)Landroid/content/pm/ServiceInfo;", "GetGetServiceInfo_Landroid_content_ComponentName_Landroid_content_pm_PackageManager_ComponentInfoFlags_Handler", ApiSince=33)>]
abstract member GetServiceInfo : Android.Content.ComponentName * Android.Content.PM.PackageManager.ComponentInfoFlags -> Android.Content.PM.ServiceInfo
override this.GetServiceInfo : Android.Content.ComponentName * Android.Content.PM.PackageManager.ComponentInfoFlags -> Android.Content.PM.ServiceInfo

参数

component
ComponentName

返回

属性

适用于