Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static String prependProtocol(String s) { if (!TextUtils.isEmpty(s) && !s.startsWith("http:") && !s.startsWith("https:")) s = (new StringBuilder("https:")).append(s).toString(); return s; } }