Uri
Types
Properties
Gets the encoded authority part of this URI. For server addresses, the authority is structured as follows: {@code userinfo '@' host ':' port }
Gets the encoded fragment part of this URI, everything after the '#'.
Gets the encoded path.
Gets the encoded query component from this URI. The query comes after the query separator ('?') and before the fragment separator ('#'). This method would return "q=android" for "http://www.google.com/search?q=android".
Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and the fragment separator '#'. If this is a relative URI, this method returns the entire URI. Leaves escaped octets intact.
Gets the encoded user information from the authority. For example, if the authority is "nobody@google.com", this method will return "nobody".
Returns true if this URI is absolute, i.e. if it contains an explicit scheme.
Returns true if this URI is hierarchical like "http://google.com". Absolute URIs are hierarchical if the scheme-specific part starts with a '/'. Relative URIs are always hierarchical.
Returns true if this URI is relative, i.e. if it doesn't contain an explicit scheme.
Gets the decoded last segment in the path.
Gets the decoded path segments.
Gets the scheme-specific part of this URI, i.e. everything between the scheme separator ':' and the fragment separator '#'. If this is a relative URI, this method returns the entire URI. Decodes escaped octets.
Functions
Searches the query string for the first value with the given key and interprets it as a boolean value. "false" and "0" are interpreted as false, everything else is interpreted as true.
Searches the query string for the first value with the given key.
Returns a set of the unique names of all query parameters. Iterating over the set will return the names in order of their first occurrence.
Searches the query string for parameter values with the given key.
Return an equivalent URI with a lowercase scheme component. This aligns the Uri with Android best practices for intent filtering.