Freigeben über


ChooserTargetService.OnGetChooserTargets(ComponentName, IntentFilter) Method

Definition

Called by the system to retrieve a set of deep-link ChooserTarget targets that can handle an intent.

[Android.Runtime.Register("onGetChooserTargets", "(Landroid/content/ComponentName;Landroid/content/IntentFilter;)Ljava/util/List;", "GetOnGetChooserTargets_Landroid_content_ComponentName_Landroid_content_IntentFilter_Handler", ApiSince=23)]
public abstract System.Collections.Generic.IList<Android.Service.Chooser.ChooserTarget>? OnGetChooserTargets (Android.Content.ComponentName? targetActivityName, Android.Content.IntentFilter? matchedFilter);
[<Android.Runtime.Register("onGetChooserTargets", "(Landroid/content/ComponentName;Landroid/content/IntentFilter;)Ljava/util/List;", "GetOnGetChooserTargets_Landroid_content_ComponentName_Landroid_content_IntentFilter_Handler", ApiSince=23)>]
abstract member OnGetChooserTargets : Android.Content.ComponentName * Android.Content.IntentFilter -> System.Collections.Generic.IList<Android.Service.Chooser.ChooserTarget>

Parameters

targetActivityName
ComponentName

the ComponentName of the matched activity that referred the system to this ChooserTargetService

matchedFilter
IntentFilter

the specific IntentFilter on the component that was matched

Returns

a list of deep-link targets to fulfill the intent match, sorted by relevance

Attributes

Remarks

Called by the system to retrieve a set of deep-link ChooserTarget targets that can handle an intent.

The returned list should be sorted such that the most relevant targets appear first. The score for each ChooserTarget will be combined with the system's score for the original target Activity to sort and filter targets presented to the user.

<em>Important:</em> Calls to this method from other applications will occur on a binder thread, not on your app's main thread. Make sure that access to relevant data within your app is thread-safe.

Java documentation for android.service.chooser.ChooserTargetService.onGetChooserTargets(android.content.ComponentName, android.content.IntentFilter).

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