Language

MockPackageManager.GetPreferredActivities Method

Definition

Caution

deprecated

Throws UnsupportedOperationException. Override this method to get preferred activities in a test.

[Android.Runtime.Register("getPreferredActivities", "(Ljava/util/List;Ljava/util/List;Ljava/lang/String;)I", "GetGetPreferredActivities_Ljava_util_List_Ljava_util_List_Ljava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public override int GetPreferredActivities(System.Collections.Generic.IList<Android.Content.IntentFilter>? outFilters, System.Collections.Generic.IList<Android.Content.ComponentName>? outActivities, string? packageName);
[<Android.Runtime.Register("getPreferredActivities", "(Ljava/util/List;Ljava/util/List;Ljava/lang/String;)I", "GetGetPreferredActivities_Ljava_util_List_Ljava_util_List_Ljava_lang_String_Handler")>]
[<System.Obsolete("deprecated")>]
override this.GetPreferredActivities : System.Collections.Generic.IList<Android.Content.IntentFilter> * System.Collections.Generic.IList<Android.Content.ComponentName> * string -> int

Parameters

outFilters
IList<IntentFilter>

The list in which to place preferred intent filters. Available to a test override; the default mock implementation does not use this argument.

outActivities
IList<ComponentName>

The list in which to place preferred activity components. Available to a test override; the default mock implementation does not use this argument.

packageName
String

The package name. Available to a test override; the default mock implementation does not use this argument.

Returns

No value is returned. The default mock implementation throws UnsupportedOperationException; override this method to supply a test result.

Attributes

Remarks

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