Hello, i am experiencing quite a delay when I click on a received push notification badge and try to open the proper page.
In this example i receive a notification of a new text message, so I want to redirect the user to that specific ChatPage
.
I use Prism for navigation, so my redirect looks like this:
private async void Current_OnNotificationOpened(object source, FirebasePushNotificationResponseEventArgs e)
{
// do something
// ...
await NavigationService.NavigateAsync($"/{Pages.MasterDetail}/{Pages.Navigation}/{Pages.MainTabbedPage}?selectedTab={Pages.Messages}/{Pages.Chat}", navigationParams);
}
The delay is easily explained.
I have a MasterDetailPage
as a wrapper, then I have a TabbedPage
with 5 tabs, and my final destination page is a descendent of the MessagesPage
(which is one of the tabs).
So you can see that the app needs to load the MasterDetailPage
, then all the tabs, and finally the ChatPage
that contains the new message.
The UX is quite unpleasant as a result.
The reason why I reload that whole path is so that the user can click the back button, find themselves in the Messages page, and keep navigating as normal.
Is there a better approach to improve this response time?