public String urlDecorate(String url, Map<String, Object> map) {
if (map == null) return url;
Uri uri = Uri.parse(url);
Uri.Builder builder = uri.buildUpon();
Iterator<Map.Entry<String, Object>> it =
map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> ent = it.next();
builder.appendQueryParameter(ent.getKey(), ent.getValue().toString());
}
return builder.build().toString();
}