Android examples for android.media:Media Uri
is Media Uri
import android.provider.MediaStore; import android.provider.MediaStore; import android.util.Log; public class Main{ /**//from www.ja v a2s . c o m * Returns true if uri is a media uri. * * @param uri * @return */ public static boolean isMediaUri(String uri) { if (uri.startsWith(Audio.Media.INTERNAL_CONTENT_URI.toString()) || uri.startsWith(Audio.Media.EXTERNAL_CONTENT_URI .toString()) || uri.startsWith(Video.Media.INTERNAL_CONTENT_URI .toString()) || uri.startsWith(Video.Media.EXTERNAL_CONTENT_URI .toString())) { return true; } else { return false; } } }