is MediaStore Audio Genre Uri - Android Media

Android examples for Media:Audio

Description

is MediaStore Audio Genre Uri

Demo Code


//package com.java2s;

import android.net.Uri;

import android.provider.MediaStore.Audio;

public class Main {
    public static boolean isAudioGenreUri(Uri uri) {
        if (uri == null) {
            return false;
        }/*from w  w  w  .  ja va 2  s  . com*/
        String uriStr = uri.toString();
        return uriStr.startsWith(Audio.Genres.EXTERNAL_CONTENT_URI
                .toString())
                || uriStr.startsWith(Audio.Genres.INTERNAL_CONTENT_URI
                        .toString());
    }
}

Related Tutorials