Intent.SetTypeAndNormalize(String) Method

Definition

Normalize and set an explicit MIME data type.

[Android.Runtime.Register("setTypeAndNormalize", "(Ljava/lang/String;)Landroid/content/Intent;", "GetSetTypeAndNormalize_Ljava_lang_String_Handler")]
public virtual Android.Content.Intent SetTypeAndNormalize (string? type);
[<Android.Runtime.Register("setTypeAndNormalize", "(Ljava/lang/String;)Landroid/content/Intent;", "GetSetTypeAndNormalize_Ljava_lang_String_Handler")>]
abstract member SetTypeAndNormalize : string -> Android.Content.Intent
override this.SetTypeAndNormalize : string -> Android.Content.Intent

Parameters

type
String

The MIME type of the data being handled by this intent.

Returns

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

Attributes

Remarks

Normalize and set an explicit MIME data type.

This is used to create intents that only specify a type and not data, for example to indicate the type of data to return.

This method automatically clears any data that was previously set (for example by #setData).

The MIME type is normalized using #normalizeMimeType before it is set, so really this is just a convenience method for

setType(Intent.normalizeMimeType(type))

Java documentation for android.content.Intent.setTypeAndNormalize(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