is MediaStore Image Thumbnail Uri - Android Media

Android examples for Media:Picture

Description

is MediaStore Image Thumbnail Uri

Demo Code


//package com.java2s;

import android.net.Uri;

import android.provider.MediaStore.Images;

public class Main {
    public static boolean isImageThumbnailUri(Uri uri) {
        if (uri == null) {
            return false;
        }/*from w  w w.  j a v  a  2s .c  o  m*/
        String uriStr = uri.toString();
        return uriStr.startsWith(Images.Thumbnails.EXTERNAL_CONTENT_URI
                .toString())
                || uriStr.startsWith(Images.Thumbnails.INTERNAL_CONTENT_URI
                        .toString());
    }
}

Related Tutorials