我查询了ALBUM_ART
和ALBUM
和倾倒光标为什么内容解析器返回专辑封装URI的空值?
final Cursor mCursor = getContentResolver().query(
MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI,
new String[]{MediaStore.Audio.Albums.ALBUM_ART},
MediaStore.Audio.Albums._ID + "=?",
albumID,
null
);
if (mCursor.moveToFirst()) {
DatabaseUtils.dumpCursor(mCursor);
mCursor.close();
} else {
mCursor.close();
}
这里是光标转储输出
System.out: 0 {
System.out: album_art=/storage/emulated/0/Android/data/com.android.providers.media/albumthumbs/1445591197242
System.out: album=Samsung
System.out: }
System.out: 1 {
System.out: album_art=null
System.out: album=The Piano Starts Here
System.out: }
System.out: 2 {
System.out: album_art=/storage/emulated/0/Android/data/com.android.providers.media/albumthumbs/1446000978698
System.out: album=Maiden Voyage
System.out: }
System.out: 3 {
System.out: album_art=/storage/emulated/0/Android/data/com.android.providers.media/albumthumbs/1446001599761
可以看到,专辑钢琴从这里开始有null
ALBUM_ART
System.out: album_art=null
System.out: album=The Piano Starts Here
但是,从Play商店下载随机音乐播放器后,我可以看出,这个音乐播放器(除其他外)能够在手机的某处找到专辑封面。这种艺术不是来自我的音乐文件夹中的一些随机图像文件。
它从哪里来?我没有把这个音乐下载到我的手机上。我从我的电脑转移它。到它是数据文件夹在谷歌Play商店
谷歌Play商店中的大多数商业音乐应用程序将下载的相册艺术保存到数据文件夹中,以防您删除他们的应用程序,您将失去它们。 –
不,我没有把这个音乐下载到我的手机上。我从我的电脑转移它。 –
你仍然可能使用现代音乐应用来播放它吗?例如,如果您从中启用PowerAmp,则PowerAmp会执行此设置。 –