listview with upcoming NOTIFICATION texts and images from whatsapp

I’m a new developer on Android, and I’m trying to feed a ListView with notifications (texts and image). I’ve already done the text, but I’m not achieving to do with upcoming images notifications.
I’ve tried with bitmaps and byte arrays, but still not done yet.

This is my code

public class NotificationService extends NotificationListenerService {
    Context context;

    @Override

    public void onCreate() {

        super.onCreate();
        context = getApplicationContext();

    }
    @Override

    public void onNotificationPosted(StatusBarNotification sbn) {
        String pack = sbn.getPackageName();
        String ticker ="";
        if(sbn.getNotification().tickerText !=null) {
            ticker = sbn.getNotification().tickerText.toString();
        }
        Bitmap bmp = null;
        Bundle extras = sbn.getNotification().extras;
        if (extras.containsKey(Notification.EXTRA_PICTURE)) {

            bmp = (Bitmap) extras.get(Notification.EXTRA_PICTURE);


        }
        String title = extras.getString("android.title");
        String text = null;
        if (text == null) {
            if (extras.get("android.textLines") != null) {
                CharSequence[] charText = (CharSequence[]) extras
                        .get("android.textLines");
                if (charText.length > 0) {
                    text = charText[charText.length - 1].toString();
                }
            }
        }
        int id1 = extras.getInt(Notification.EXTRA_SMALL_ICON);

        Bitmap id = sbn.getNotification().largeIcon;



        Log.i("Ticker",ticker);
        Log.i("Title",title);
        Log.i("Text",text);



        Intent msgrcv = new Intent("Msg");
        msgrcv.putExtra("package", pack);
        msgrcv.putExtra("ticker", ticker);
        msgrcv.putExtra("title", title);
        msgrcv.putExtra("text", text);
        msgrcv.putExtra("byteArray",bmp);




        if(id != null) {
            ByteArrayOutputStream stream = new ByteArrayOutputStream();
            id.compress(Bitmap.CompressFormat.PNG, 100, stream);
            byte [] byteArray = stream.toByteArray();
            msgrcv.putExtra("icon",byteArray);
        }
        LocalBroadcastManager.getInstance(context).sendBroadcast(msgrcv);


    }

    @Override

    public void onNotificationRemoved(StatusBarNotification sbn) {
        Log.i("Msg","Notification Removed");

    }
}

Thanks for the help!