Java tutorial
//package com.java2s; import android.net.Uri; public class Main { public static String createDialNumber(String bridge, String host, String code) { String dialString = "tel:"; dialString = dialString + bridge + Uri.parse(",") + Uri.parse(","); if (host != null && !host.isEmpty()) { dialString = dialString + host + Uri.parse("#"); } if (code != null && !code.isEmpty()) { dialString = dialString + Uri.parse(",") + code + Uri.parse("#"); } return dialString; } }