Snaží načíst audio miniatur z url s glide, ale nefunguje
Glide
.with(this)
.load("http://api.boleiachain.com/upload/musictest.mp3")
.apply(options)
.centerCrop()
.placeholder(R.drawable.ic_loading)
.into(civ_image);
a já jsem se snažil to
public Bitmap coverpicture(String path) {
Bitmap bitmap=null;
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
mediaMetadataRetriever.setDataSource(path, new HashMap<String, String>());
try {
final byte[] coverImage = mediaMetadataRetriever.getEmbeddedPicture();
bitmap= BitmapFactory.decodeByteArray(coverImage, 0, coverImage.length);
} catch (Exception e) {
e.printStackTrace();
}
return bitmap;
}
Glide
.with(this)
.load(coverpicture("http://api.boleiachain.com/upload/musictest.mp3"))
.apply(options)
.centerCrop()
.placeholder(R.drawable.ic_loading)
.into(civ_image);
to funguje, ale se zpožděním, což není dobré praxe v recyclerView adaptér