Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当谷歌播放音乐播放本地文件时,我知道如何获取专辑封面。
当播放的音乐不是来自设备文件时,有没有办法获得封面?
我找到了一种获取封面的方法:我正在通过 Android 的 NotificationListenerService 收听谷歌播放通知并获取大图标:
Bitmap coverbitmap = ((Bitmap) extras.getParcelable(Notification.EXTRA_LARGE_ICON));
这(使用“附加”通知包)需要 API 级别 19。