Android Question NB6 Firebase Messaging


Active Member
Licensed User
I am creating notifications using FirebaseMessaging. I have used some of the functions mentioned here.

Scenario : Send two or more notifications to the android app.
When the target is set to a service name in, the corresponding "service_start" is executed only when the first notification is clicked.
when the second notification is clicked, "service_start" is not executed << Problem

Sub Service_Start (StartingIntent As Intent)
    If StartingIntent.IsInitialized Then fm.HandleIntent(StartingIntent)
    Service.StopAutomaticForeground 'remove if not using B4A v8+.
End Sub
when the target is set to an Activity name, activity_resume is called every time the notification is clicked. How do i get this working for a service.
I am trying to run a piece of code before showing a activity based on user logged in status.

thank you
Last edited:


Active Member
Licensed User
Sub fm_MessageArrived (Message As RemoteMessage)
    Log("Message arrived")
    Log($"Message data: ID ${Message.MessageId}, Data ${Message.GetData}"$)
    Dim n As NB6
    n.Initialize("default", Application.LabelName, "DEFAULT",False).AutoCancel(True)
    n.Build(Message.GetData.Get("title"), Message.GetData.Get("body"), "tag", Null,"FirebaseMessaging").Notify(DateTime.Now)
End Sub