Java tutorial
//package com.java2s; import android.net.Uri; public class Main { /** * get the scheme of the url * @param url * @return */ public static String getScheme(String url) { return Uri.parse(url).getScheme(); } }