BaseBundle.GetString Method

Definition

Overloads

GetString(String)

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

GetString(String, String)

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associated with the given key.

GetString(String)

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

[Android.Runtime.Register("getString", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Handler")]
public virtual string? GetString (string? key);
[<Android.Runtime.Register("getString", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Handler")>]
abstract member GetString : string -> string
override this.GetString : string -> string

Parameters

key
String

a String, or null

Returns

a String value, or null

Attributes

Remarks

Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.

Java documentation for android.os.BaseBundle.getString(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

GetString(String, String)

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associated with the given key.

[Android.Runtime.Register("getString", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual string? GetString (string? key, string? defaultValue);
[<Android.Runtime.Register("getString", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetString_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member GetString : string * string -> string
override this.GetString : string * string -> string

Parameters

key
String

a String, or null

defaultValue
String

Value to return if key does not exist or if a null value is associated with the given key.

Returns

the String value associated with the given key, or defaultValue if no valid String object is currently mapped to that key.

Attributes

Remarks

Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key or if a null value is explicitly associated with the given key.

Java documentation for android.os.BaseBundle.getString(java.lang.String, 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