iOS Question Which B4XPage is currently active ?

ykucuk

Well-Known Member
Licensed User
Longtime User
I have a project with multiple B4XPages, and users could be on any of these pages at a given time. I want to display a temporary panel at the top of the screen with a message when a notification is received in the MessageReceivedWhileInTheForeground function of FirebaseMessaging. Since I do not know which B4XPage is currently active, how can I achieve this?

Here's a detailed requirement:

  • The panel should appear at the very top of the screen.
  • The message should be displayed temporarily and then disappear after a few seconds.
  • This should work regardless of which B4XPage is currently active.
How can I implement this in my B4i project?
 

jahswant

Well-Known Member
Licensed User
Longtime User
B4XPages.GetManager.GetTopPage

Note that GetTopPage returns a B4XPageInfo object. You can check its id field to find which page is actually on top. B4XPageInfo.B4XPage will return the page class.
 
Upvote 1
Top