Android.Test.Mock.MockPackageManager.ResolveActivity Method
Determine the best action to perform for a given Intent.

Syntax

[Android.Runtime.Register("resolveActivity", "(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;", "GetResolveActivity_Landroid_content_Intent_IHandler")]
public override Android.Content.PM.ResolveInfo ResolveActivity (Android.Content.Intent intent, [Android.Runtime.GeneratedEnum] Android.Content.PM.PackageInfoFlags flags)

Parameters

intent
An intent containing all of the desired specification (action, data, type, category, and/or component).
flags
Additional option flags. The most important is Android.Content.PM.PackageManager.MATCH_DEFAULT_ONLY, to limit the resolution to only those activities that support the Android.Content.Intent.CategoryDefault.

Returns

Documentation for this section has not yet been entered.

Remarks

Determine the best action to perform for a given Intent. This is how Android.Content.Intent.ResolveActivity(Android.Content.PM.PackageManager) finds an activity if a class has not been explicitly specified.

Note: if using an implicit Intent (without an explicit ComponentName specified), be sure to consider whether to set the Android.Content.PM.PackageManager.MATCH_DEFAULT_ONLY only flag. You need to do so to resolve the activity in the same way that Android.Content.Context.StartActivity(Android.Content.Intent) and Android.Content.Intent.ResolveActivity(Android.Content.PM.PackageManager) do.

[Android Documentation]

Requirements

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