Java tutorial
//package com.java2s; //License from project: Open Source License import android.net.Uri; public class Main { public static String getGooglePlayUrl(String utmSource, String utmContent) { Uri.Builder builder = new Uri.Builder(); builder.scheme("https"); builder.authority("play.google.com"); builder.path("/store/apps/details"); builder.appendQueryParameter("id", "com.konifar.kotoha"); if (utmSource != null && utmContent != null) { StringBuffer sb = new StringBuffer(); sb.append("utm_source="); sb.append(utmSource); sb.append("&utm_medium=direct"); sb.append("&"); sb.append("utm_content="); sb.append(utmContent); builder.appendQueryParameter("referrer", sb.toString()); } return builder.build().toString(); } }