Android Question Push Notification (Null message)

Hi someone could help me with the following: I tried the Erel tutorial to integrate push notifications using Firebase, I managed to send them from a php project, but I have observed some details:

1. When the application is paused, the Title and the notification message arrive very well:
1664757017771.png

2. When the application is in use it generates a null notification.
1664757159139.png

3. In both cases when the notifications arrive when you click on them, it does not open the application.
4. Does not emit tone or vibration alert

Can anyone help me with it?

here is the code:

Code:
Sub fm_MessageArrived (Message As RemoteMessage)
    
    Try
        Log("Message arrived")
        Log($"Message data: ${Message.GetData}"$)
        Dim n As Notification
    
        'n.Initialize
        n.Initialize2 (n.IMPORTANCE_HIGH)
        n.AutoCancel =True
    
        n.Icon = "icon"
        n.Vibrate = True
        n.Light = True
    n.Sound =True
        n.SetInfo(Message.GetData.Get("title"), Message.GetData.Get("body"), Main)
        n.Notify(1)
      

        
    Catch
        Log(LastException)
    End Try
    
    

    
    
    
End Sub
 
Thanks for the prompt response Erel, if I am using the B4J server and if it is sent, I have already reviewed the way and apparently it is my way of doing it from PHP that is not preparing properly as the B4J server does, I am doing tests to adjust as close as possible to the way to do it but for php. I tell you how I do later
 
Upvote 0
Top