Share via


Intent.AddCategory(String) Method

Definition

Add a new category to the intent.

[Android.Runtime.Register("addCategory", "(Ljava/lang/String;)Landroid/content/Intent;", "GetAddCategory_Ljava_lang_String_Handler")]
public virtual Android.Content.Intent AddCategory (string? category);
[<Android.Runtime.Register("addCategory", "(Ljava/lang/String;)Landroid/content/Intent;", "GetAddCategory_Ljava_lang_String_Handler")>]
abstract member AddCategory : string -> Android.Content.Intent
override this.AddCategory : string -> Android.Content.Intent

Parameters

category
String

The desired category. This can be either one of the predefined Intent categories, or a custom category in your own namespace.

Returns

Returns the same Intent object, for chaining multiple calls into a single statement.

Attributes

Remarks

Add a new category to the intent. Categories provide additional detail about the action the intent performs. When resolving an intent, only activities that provide <em>all</em> of the requested categories will be used.

Java documentation for android.content.Intent.addCategory(java.lang.String).

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

See also