Code example for ContentResolver

Methods: delete

        final Uri uri = ContentUris.withAppendedId(Snapshots.CONTENT_URI, id);
        final ContentResolver cr = getActivity().getContentResolver();
        new Thread() {
            public void run() { 
                cr.delete(uri, null, null);
    public void onItemClick(AdapterView<?> parent, View view, int position,
            long id) {
    private static class SnapshotAdapter extends ResourceCursorAdapter {
        private long mAnimateId;
        private AnimatorSet mAnimation;
Connect your IDE to all the code out there  Get Codota for Java