Java tutorial
//package com.java2s; //License from project: Open Source License import android.net.Uri; import java.util.Map; public class Main { public static String jointUrl(String url, Map<String, String> params) { if (params != null && params.size() > 0) { Uri uri = Uri.parse(url); Uri.Builder b = uri.buildUpon(); for (Map.Entry<String, String> entry : params.entrySet()) { b.appendQueryParameter(entry.getKey(), entry.getValue()); } return b.build().toString(); } return url; } }