title: How to keep my foreground service notification (MediaStyle) on top like Google Play Music?
body: <p>So, I have a PlayerService, which is basically an audio player. It is foreground and uses MediaStyle with custom actions (buttons in the notification) like prev, play/pause, next and close. </p>
  
  <p>The problem is that when I launch some other audio app like Google Play Music, it's notification is always above mine! If I launch 2 other audio apps with mine, when I click on the play icon in their notifications, that notification goes to the top and stay there. While mine is always second place from the top. It doesn't matter if my application is playing or not. </p>
  
  <p>Tried with all versions of API. But let's say I mostly use it with pre-Oreo, so we can forget about NotificationChannel stuff. </p>
  
  <p>Also tried to use MediaSession, and set PRIORITY_MAX, but still no luck. By the way, AudioFocus and all other things work well. Notification priority is the only issue.</p>
  
  <p>getNotification() method:</p>
  
  <pre class="lang-java prettyprint-override"><code>return NotificationCompat.Builder( this, CHANNEL_ID )
              .setTicker(ticker)
              .setContentTitle(title)
              .setContentText(text)
              .setSmallIcon(icon)
              .setLargeIcon(icon)
              .setContentIntent(notificationPendingIntent)
              .addAction(prevAction)
              .addAction(playAction)
              .addAction(nextAction)
              .addAction(stopAction)
              .setPriority(NotificationCompat.PRIORITY_HIGH)
              .setStyle(androidx.media.app.NotificationCompat.MediaStyle()
                  .setShowActionsInCompactView(0, 1, 2)
              )
              .setColor(color)
              .setWhen(System.currentTimeMillis())
              .setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
              .build()
  </code></pre>
  
  <p>Update it with:</p>
  
  <pre><code>notificationManager.notify( 1, getNotification() )
  </code></pre>
  
  <p>Action example:</p>
  
  <pre><code>NotificationCompat.Action(
          R.drawable.play,
          "Play",
          PendingIntent.getBroadcast(
              this,
              REQUEST_CODE,
              playIntent,
              PendingIntent.FLAG_UPDATE_CURRENT
          )
      ) 
  </code></pre>