is MediaStore Video Uri - Android Media

Android examples for Media:Video

Description

is MediaStore Video Uri

Demo Code


//package com.java2s;

import android.net.Uri;

import android.provider.MediaStore.Video;

public class Main {
    public static boolean isVideoUri(Uri uri) {
        if (uri == null) {
            return false;
        }//from w ww. j av a 2s.c  o  m
        String uriStr = uri.toString();
        return uriStr.startsWith(Video.Media.EXTERNAL_CONTENT_URI
                .toString())
                || uriStr.startsWith(Video.Media.INTERNAL_CONTENT_URI
                        .toString());
    }
}

Related Tutorials