Share via


PackageManager.GetServiceInfo Method

Definition

Overloads

GetServiceInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular service class.

GetServiceInfo(ComponentName, PackageManager+ComponentInfoFlags)

GetServiceInfo(ComponentName, PackageInfoFlags)

Retrieve all of the information we know about a particular service class.

[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

Parameters

component
ComponentName

The full component name (i.e. com.google.apps.media/com.google.apps.media. BackgroundPlayback) of a Service class.

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

A ServiceInfo object containing information about the service.

Attributes

Exceptions

Remarks

Retrieve all of the information we know about a particular service class.

Use #getServiceInfo(ComponentName, ComponentInfoFlags) when long flags are needed.

Java documentation for android.content.pm.PackageManager.getServiceInfo(android.content.ComponentName, 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

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

Parameters

component
ComponentName

Returns

Attributes

Applies to