delete Internal Ring Pack Tones from MediaStore - Android Media

Android examples for Media:Ring

Description

delete Internal 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 deleteInternalRingPackTones(Context ctx) {
        return deleteRingPackTones(ctx,
                MediaStore.Audio.Media.INTERNAL_CONTENT_URI);
    }/*from  w w w .ja 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