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

How to navigate to a particular page when user taps on a Local Notification in Xamarin Forms app?

$
0
0

Hi am developing a Xamarin Forms app. i have implemented local notifications in the app. When the notification has fired, upon clicking the notification it has to navigate to a particular page. In iOS project in Appdelegate.cs i wrote this method

public async  override void ReceivedLocalNotification(UIApplication application, UILocalNotification notification)

which will fire when the user taps on the notification. here i need to navigate to a page. Here i wrote the below line of code

        App.Current.MainPage  = new NavigationPage(new FavoritesPage());

It is navigating to the Favorites page but it is just displaying a blank page. OnNavigatedTo method is not calling for the FavoritesViewModel and in the Onnavigated to am calling a method which takes id(this id comes from the notification) as parameter to get a particular favorite Here two questions 1) How to navigate to a Specific page 2) How to pass a parameter along with the page navigation. Can someone please help me to solve this issue.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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