Is there a way to make stay longer, stick until the user clicks it, or specify time for it to stay there before hiding ? I am using Firebase Cloud Messaging.

How does Whatsapp manage to do this for incoming calls ?

enter image description here

1

There are 1 best solutions below

0
On

That can be difficult, from what I've read, keeping a heads-up notification comes from a high priority alert: https://developer.android.com/training/notify-user/time-sensitive#create-high-priority-notification

You may be able to get the same results from FCM with a high priority message, just know that this does have varied results on user devices from settings to custom lock screens.

source: https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message