I have made a music player and I want to save images for album art. Where should I put all the images: in the Asset folder or somewhere else? The images are in large quantity and I want the images available in the app after publishing it.
I also try to get images through URL with this method
private Bitmap downloadBitmap(final String url) {
final MediaMetadataRetriever metaRetriever = new MediaMetadataRetriever();
metaRetriever.setDataSource(url, new HashMap<String, String>());
try {
final byte[] art = metaRetriever.getEmbeddedPicture();
return BitmapFactory.decodeByteArray(art, 0, art.length);
} catch (Exception e) {
Log.d("ALBUM ERROR", "Couldn't create album art: " + e.getMessage());
return null;
}finally {
metaRetriever.release();
}
}
But the image loading is very slow. This is why I try to save image in the app asset folder, so images are always there if app is publish.