Android Utililty Methods URI Create

List of utility methods to do URI Create

Description

The list of methods to do URI Create are organized into topic(s).

Method

StringmakeUriString(Uri uri)
make Uri String
StringBuilder stringbuilder = new StringBuilder();
String s = uri.getScheme();
if (s != null)
    stringbuilder.append(s).append(':');
String s1 = uri.getEncodedAuthority();
if (s1 != null)
    stringbuilder.append("//").append(s1);
String s2 = Uri.encode(uri.getPath(), "/=");
...
UricreateUriFromString(String uriString)
Sipgate sends "URIs" without the "//", so we have to insert them.
Uri uri;
if (uriString.startsWith("sip://")) {
    uri = Uri.parse(uriString);
} else {
    StringBuilder uriBuilder = new StringBuilder(uriString);
    uri = Uri.parse(uriBuilder.insert(4, "//").toString());
return uri;
...