Android.Content.Intent.ResolveActivity Method
Return the Activity component that should be used to handle this intent.

Syntax

[Android.Runtime.Register("resolveActivity", "(Landroid/content/pm/PackageManager;)Landroid/content/ComponentName;", "GetResolveActivity_Landroid_content_pm_PackageManager_Handler")]
public virtual ComponentName ResolveActivity (Android.Content.PM.PackageManager pm)

See Also

Intent.SetComponent(ComponentName)
Intent.Component
Intent.ResolveActivityInfo(Android.Content.PM.PackageManager, Android.Content.PM.PackageInfoFlags)

Parameters

pm
The package manager with which to resolve the Intent.

Returns

Documentation for this section has not yet been entered.

Remarks

Return the Activity component that should be used to handle this intent. The appropriate component is determined based on the information in the intent, evaluated as follows:

If Intent.Component returns an explicit class, that is returned without any further consideration.

The activity must handle the Intent.CategoryDefault Intent category to be considered.

If Intent.Action is non-NULL, the activity must handle this action.

If Intent.ResolveType(ContentResolver) returns non-NULL, the activity must handle this type.

If Intent.AddCategory(string) has added any categories, the activity must handle ALL of the categories specified.

If Intent.Package is non-NULL, only activity components in that application package will be considered.

If there are no activities that satisfy all of these conditions, a null string is returned.

If multiple activities are found to satisfy the intent, the one with the highest priority will be used. If there are multiple activities with the same priority, the system will either pick the best activity based on user preference, or resolve to a system class that will allow the user to pick an activity and forward from there.

This method is implemented simply by calling Android.Content.PM.PackageManager.ResolveActivity(Intent, Android.Content.PM.PackageInfoFlags) with the "defaultOnly" parameter true.

This API is called for you as part of starting an activity from an intent. You do not normally need to call it yourself.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1