Udostępnij za pośrednictwem


PackageManager.ResolveService Method

Definition

Overloads

ResolveService(Intent, PackageInfoFlags)

Determine the best service to handle for a given Intent.

ResolveService(Intent, PackageManager+ResolveInfoFlags)

ResolveService(Intent, PackageInfoFlags)

Determine the best service to handle for a given Intent.

[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

Parameters

intent
Intent

An intent containing all of the desired specification (action, data, type, category, and/or component).

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

Returns a ResolveInfo object containing the final service intent that was determined to be the best action. Returns null if no matching service was found.

Attributes

Remarks

Determine the best service to handle for a given Intent.

Use #resolveService(Intent, ResolveInfoFlags) when long flags are needed.

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

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

Parameters

intent
Intent

Returns

Attributes

Applies to