Hi all.
I tried to use a Firebase Notifications - it works fine, I was able to push a notification from B4J example but my question is - how to keep a previous notification?
Let say I sent a notification with a title "AAA" and body "BBB". It comes to my app and I can see it.
Later on I pushed another notification with a title "AAA2" and body "BBB2". It comes to my app and I can see it. But how about the previous one? I can't see it in a list. Only the last one?
Let say a customer received 5 notifications overnight. How to show all of them but not just a last one?
Her is a code from FirebaseMessagin Service
I tried to use a Firebase Notifications - it works fine, I was able to push a notification from B4J example but my question is - how to keep a previous notification?
Let say I sent a notification with a title "AAA" and body "BBB". It comes to my app and I can see it.
Later on I pushed another notification with a title "AAA2" and body "BBB2". It comes to my app and I can see it. But how about the previous one? I can't see it in a list. Only the last one?
Let say a customer received 5 notifications overnight. How to show all of them but not just a last one?
Her is a code from FirebaseMessagin Service
FirebaseMessaging:
#Region Service Attributes
#StartAtBoot: False
#End Region
Sub Process_Globals
Private fm As FirebaseMessaging
End Sub
Sub Service_Create
fm.Initialize("fm")
End Sub
Public Sub SubscribeToTopics
fm.SubscribeToTopic("general") 'you can subscribe to more topics
End Sub
Sub Service_Start (StartingIntent As Intent)
If StartingIntent.IsInitialized Then fm.HandleIntent(StartingIntent)
Sleep(0)
Service.StopAutomaticForeground 'remove if not using B4A v8+.
End Sub
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)
End Sub
Sub Service_Destroy
End Sub