我正在制作无线电应用程序,它使用的是大喊广播流。除了在通知大图标上显示播放轨道的艺术品外,我的应用程序一切都很好。我想用里的艺术品。但它从来没有展示过巨无霸的艺术品。这是原木
11-10 17:28:58.624 21627-21627/*我/艺术品: /storage/emulated/0/******/Radio/artworks/fb7fb1d9ad.jpg 11-10 17:28:58.628 21627-21627/* W/System.err: at * .Radyo.nowPlayingN(Radyo.java:684)
if(uri==null) {
Bitmap Largeicon = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher_for_radio);
notification.setLargeIcon(Largeicon);
}else {
try {
Log.i("Artwork", uri);
Bitmap SavedArtwork = MediaStore.Images.Media.getBitmap(this.getContentResolver(), Uri.parse(uri));
notification.setLargeIcon(SavedArtwork);
} catch (IOException e) {
notification.setLargeIcon(BitmapFactory.decodeResource(this.getResources(),R.mipmap.ic_launcher_for_radio));
e.printStackTrace();
}
}发布于 2015-11-19 21:43:39
我用这个解决了问题
Bitmap SavedArtwork = MediaStore.Images.Media.getBitmap(this.getContentResolver(), Uri.parse("file://"+uri));https://stackoverflow.com/questions/33633621
复制相似问题