Condividi tramite


Uri.GetQueryParameter(String) Method

Definition

Searches the query string for the first value with the given key.

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

Parameters

key
String

which will be encoded

Returns

the decoded value or null if no parameter is found

Attributes

Exceptions

if this isn't a hierarchical URI

if key is null

Remarks

Searches the query string for the first value with the given key.

<strong>Warning:</strong> Prior to Jelly Bean, this decoded the '+' character as '+' rather than ' '.

Java documentation for android.net.Uri.getQueryParameter(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