title: get MediaPlayer album art as a bitmap
body: <p>Hey all so i've been working in a media play application so i tried to make notification control the media so everything is working fine except that the media style in the notification wont accept the album art in the <strong>.setLargeIcont()</strong> so i need a way to get the album art as a bitmap.</p>
  <pre><code>public void showNotification(int playPauseBtn) {
      Bitmap bitmap=null;
      try {
          uri = Uri.parse(listSongs.get(position).getPath());
          byte[] image = getAlbumArt(listSongs.get(position).getPath());
          bitmap = MediaStore.Images.Media.getBitmap(
                  context.getContentResolver(),uri);
          bitmap= Bitmap.createScaledBitmap(bitmap,30,30,true);
      }catch (FileNotFoundException exception) {
          exception.printStackTrace();
          bitmap = BitmapFactory.decodeResource(context.getResources(),
                  R.drawable.main_bg);
      } catch (IOException e) {
  
          e.printStackTrace();
      }
  
      Intent intent = new Intent(this, PlayerActivity.class);
      PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, 0);
      Intent prevIntent = new Intent(this, NotificationReciever.class).setAction(ACTION_PREV);
      PendingIntent prevPendindIntent = PendingIntent.getBroadcast(this, 0, prevIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      Intent playIntent = new Intent(this, NotificationReciever.class).setAction(ACTION_PLAY);
      PendingIntent playPendindIntent = PendingIntent.getBroadcast(this, 0, playIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      Intent nextIntent = new Intent(this, NotificationReciever.class).setAction(ACTION_NEXT);
      PendingIntent nextPendindIntent = PendingIntent.getBroadcast(this, 0, nextIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
              //Bitmap picture = BitmapFactory.decodeResource(getResources(), R.id.cover_art);
      NotificationCompat.Builder notification = new NotificationCompat.Builder(this, CHANNEL_ID_2)
              .setSmallIcon(R.id.cover_art)
              .setLargeIcon(bitmap)
              .setContentTitle(listSongs.get(position).getTitle())
              .setContentText(listSongs.get(position).getArtist())
              .addAction(R.drawable.ic_skip_previous, &quot;Previous&quot;, prevPendindIntent)
              .addAction(playPauseBtn, &quot;Play&quot;, playPendindIntent)
              .addAction(R.drawable.ic_skip_next, &quot;Next&quot;, nextPendindIntent)
              .setStyle(new androidx.media.app.NotificationCompat.MediaStyle()
                      .setMediaSession(mediaSession.getSessionToken()))
              .setPriority(NotificationCompat.PRIORITY_LOW)
              .setContentIntent(contentIntent)
              .setOnlyAlertOnce(true);
      NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
      notificationManager.notify(0, notification.build());
  
  
  }
  </code></pre>