Code example for MediaMetadataRetriever

Methods: getEmbeddedPicturerelease

0
    private long albumId;
    private static HashSet<Long> set = new HashSet<Long>();
 
    public static Bitmap getBitmapMetadata(MediaMetadataRetriever metadata)
    { 
        byte[] bitmap = metadata.getEmbeddedPicture();
        metadata.release();
 
        BitmapFactory.Options options = new BitmapFactory.Options();
        options.outWidth = 500;
        options.outHeight = 500;
 
        if(bitmap != null)
            return BitmapFactory.decodeByteArray(bitmap,0,bitmap.length,options);
        else 
            return null; 
    } 
 
    protected abstract void onGetBitmap(Bitmap bitmap);
    protected abstract void onBitmapSaved(long albumId);
Contextual code suggestions in your IDE  Get Codota for Java