Java tutorial
//package com.java2s; import android.net.Uri; import android.text.TextUtils; public class Main { public static boolean validateSourceUri(Uri uri) { return uri != null && !TextUtils.isEmpty(uri.toString()); } }