title: Flutter/Firebase - How to get "heads up" notification on Android?
body: <p>I have a Flutter application using the firebase-messaging plugin for push notifications.</p>
  <p>I register firebase like normal on the client, and I send the <code>fcmToken</code> to the server.</p>
  <p>Notifications are created via a python server using <code>aiofcm</code> (which uses firebase's XMPP api). They're created like this:</p>
  <pre><code>message = aiofcm.Message(
      device_token = t2,
      notification = {
          &quot;title&quot;:notification_title,
          &quot;body&quot;:notification_body,
          &quot;sound&quot;:&quot;default&quot;,
          &quot;tag&quot;:link
      },
      data = {
          &quot;click_action&quot;: &quot;FLUTTER_NOTIFICATION_CLICK&quot;
      },
      priority=aiofcm.PRIORITY_HIGH
  )
  await fcm.send_message(message)
  </code></pre>
  <p>On iOS, notifications pop-up at the top of the screen.</p>
  <p>On Android, only the icon shows up in the notification tray - not any of the notification content. This is tested on a Pixel 3 and a OnePlus 6, both running Android P.</p>
  <p>Ideally, I would like the notification to be &quot;heads-up&quot; style like this:</p>
  <p><a href="https://i.stack.imgur.com/qdQjTm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qdQjTm.png" alt="enter image description here" /></a></p>
  <p>Before I was able to accomplish this using <code>data</code> messages and creating the notification programmatically in native android, however I would like to avoid that if possible since data messages don't get delivered on Android if the app is terminated.</p>