Java tutorial
//package com.java2s; //License from project: Apache License import android.net.Uri; public class Main { /** * @param uri The Uri to check. * @return Whether the Uri authority is ExternalStorageProvider. */ private static boolean isExternalStorageDocument(Uri uri) { return "com.android.externalstorage.documents".equals(uri.getAuthority()); } }