在我的安卓应用中,我想在用户长按特定歌曲时从播放列表中删除该歌曲。为此,我使用了
代码:
Contentresolver.delete()
方法,但它不起作用。它既不抛出错误也不删除数据?这是我的代码,请告诉我为什么它不起作用。代码:
ContentResolver resolver = DefaultSongList.this.getContentResolver();
Uri mUri = MediaStore.Audio.Playlists.Members.getContentUri("external",playListId);
String audioId = songsList.get(pos).get("id");
resolver.delete(mUri,MediaStore.Audio.Playlists.Members.AUDIO_ID +" = "+ audioId , null);
Toast.makeText(DefaultSongList.this, "Song removed from Playlist.", Toast.LENGTH_SHORT).show();
resolver.delete(...)
的结果吗? - user