is MediaStore Audio Playlist Uri - Android Media

Android examples for Media:Audio

Description

is MediaStore Audio Playlist Uri

Demo Code


//package com.java2s;

import android.net.Uri;

import android.provider.MediaStore.Audio;

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

Related Tutorials