Partager via


Intent.GetIntExtra(String, Int32) Method

Definition

Retrieve extended data from the intent.

[Android.Runtime.Register("getIntExtra", "(Ljava/lang/String;I)I", "GetGetIntExtra_Ljava_lang_String_IHandler")]
public virtual int GetIntExtra (string? name, int defaultValue);
[<Android.Runtime.Register("getIntExtra", "(Ljava/lang/String;I)I", "GetGetIntExtra_Ljava_lang_String_IHandler")>]
abstract member GetIntExtra : string * int -> int
override this.GetIntExtra : string * int -> int

Parameters

name
String

The name of the desired item.

defaultValue
Int32

the value to be returned if no value of the desired type is stored with the given name.

Returns

the value of an item previously added with putExtra(), or the default value if none was found.

Attributes

Remarks

Retrieve extended data from the intent.

Java documentation for android.content.Intent.getIntExtra(java.lang.String, int).

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

  • <xref:Android.Content.Intent.PutExtra(System.String%2c+System.Int32)>