delete External Ring Pack Tones from MediaStore - Android Media

Android examples for Media:Ring

Description

delete External Ring Pack Tones from MediaStore

Demo Code


//package com.java2s;

import android.content.Context;

import android.net.Uri;

import android.provider.MediaStore;

public class Main {
    public static int deleteExternalRingPackTones(Context ctx) {
        return deleteRingPackTones(ctx,
                MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
    }/*from   www  .j  a v  a  2 s  .  c o  m*/

    private static int deleteRingPackTones(Context ctx, Uri tableUri) {
        String selection = MediaStore.MediaColumns.DATA + " LIKE ?";
        String[] args = { "%com.cryclops.ringpack%" };

        return ctx.getContentResolver().delete(tableUri, selection, args);
    }
}

Related Tutorials