How to know which page is displayed?

I’m using Tabs template in my Ionic application. In android I have an two issues, the first one is the popover is not dismissed when a user pressing the back button. the second one is while navigating between tabs, pressing the back button will pop to the previous tab.

I’m interesting to solve this two issues, so I use platform.registerBackButtonAction and give it high priority than the default handler. I succeed in dismissing the popover when pressing back but in order to solve the second issue I need to figure out which page is displayed to the user in order to determine if to navigate back.
Any ideas how can I know which page is displayed to the user?