List of utility methods to do URI Create
String | makeUriString(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(), "/="); ... |
Uri | createUriFromString(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; ... |