I wanted to check how I can do when I send several notifications, when I receive them, it shows me only the last one, and I need to see them all. Thank you
If you send a notification message (see my thread what I mean here) Android pushes the notification automatically and you don't have much control over it. It's just "shoot & forget" (from the view of Google).
Generally it's better to send/receive data messages. You recive just the data, store the message and throw a notification when you want. Often you have a "system message" to control your app to do something (like download new data or so). With this you can create your own message system (some for the users, some internal only).
Use a different id for each notification in the n.Notify line:
B4X:
Sub fm_MessageArrived (Message As RemoteMessage)
Log("Message arrived")
Log($"Message data: ${Message.GetData}"$)
Dim n As Notification
n.Initialize
n.Icon = "icon"
n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
n.Notify(1)
Log(Message.SentTime)
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.