Android.Content.Intent.Selector Property
Return the specific selector associated with this Intent.

Syntax

[get: Android.Runtime.Register("getSelector", "()Landroid/content/Intent;", "GetGetSelectorHandler")]
[set: Android.Runtime.Register("setSelector", "(Landroid/content/Intent;)V", "GetSetSelector_Landroid_content_Intent_Handler")]
public virtual Intent Selector { get; set; }

See Also

Intent.Selector

Value

Documentation for this section has not yet been entered.

Remarks

Get method documentation [Android Documentation]

Return the specific selector associated with this Intent. If there is none, returns null. See Intent.Selector for more information.

Set method documentation [Android Documentation]

Set a selector for this Intent. This is a modification to the kinds of things the Intent will match. If the selector is set, it will be used when trying to find entities that can handle the Intent, instead of the main contents of the Intent. This allows you build an Intent containing a generic protocol while targeting it more specifically. An example of where this may be used is with things like Intent.CategoryAppBrowser. This category allows you to build an Intent that will launch the Browser application. However, the correct main entry point of an application is actually Intent.ActionMainIntent.CategoryLauncher with Intent.SetComponent(ComponentName) used to specify the actual Activity to launch. If you launch the browser with something different, undesired behavior may happen if the user has previously or later launches it the normal way, since they do not match. Instead, you can build an Intent with the MAIN action (but no ComponentName yet specified) and set a selector with Intent.ActionMain and Intent.CategoryAppBrowser to point it specifically to the browser activity.

Setting a selector does not impact the behavior of Intent.FilterEquals(Intent) and Intent.FilterHashCode. This is part of the desired behavior of a selector -- it does not impact the base meaning of the Intent, just what kinds of things will be matched against it when determining who can handle it.

You can not use both a selector and Intent.SetPackage(string) on the same base Intent.

Requirements

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