Android Question [B4XPages] [SOLVED] How to ShowPage after FirebaseMessage Arrived?

Mashiane

Expert
Licensed User
Longtime User
Ola

I've been trying to show a page after firebase message is received. Depending on the active page, a real time update needs to be updated on the xui listview.

Thing is, this is not working... For example, if the message contains gps coordinates and the active page is myloc, the page will show the point on the map.

B4X:
If B4XPages.IsInitialized Then
            B4XPages.MainPage.UpdateBadge
            LogColor("Determining the active page...", Colors.Cyan)
            Dim ap As String = B4XPages.MainPage.ActivePage
            Log(ap)
            
            Select Case ap
            Case "pg1"
                B4XPages.ShowPage("pg1")
            Case "myloc"   
                Main.FromNotification = True
                Main.NotificationPosition = data
                B4XPages.ShowPage("myloc")
            End Select
            LogColor("Did the page show?", Colors.Magenta)
        End If

I am logginx B4xPages event logs...

1611662145189.png


myloc page has a GoogleMap...

The second scenario is an update of a xui listview is the page is pg1, dololo.

Can one advise how to manage this?

Thanks
 
Top