Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin Forms: Prism: Android: Open a page when clicks on Push Notification

$
0
0

Hi,
We are implementing Push Notification in our app. For iOS, we didn't see much challenges, but with Android, stuck at navigation.
When click on notification alert, need to navigate to MainPage as shown in below code).

It is calling MainPage, but, not initializing ViewModel (MainPageViewModel).
I am not very sure, is this the right way of navigating from Android project.
Similar code worked fine in iOS.
Any hints please?

    protected override void OnNewIntent(Intent intent)
        {
            base.OnNewIntent(intent);
            Intent = intent;
            var page = new NavigationPage(new MainPage());
            Prism.PrismApplicationBase.Current.MainPage = page;
        }

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>