Azure / azure-notificationhubs-xamarin

Azure Notification Hubs Sample for Xamarin Forms
MIT License
35 stars 23 forks source link

How to implement custom actions #54

Closed R00iBaard closed 3 years ago

R00iBaard commented 3 years ago

Hi there,

Dont know if this is the correct terminology (Custom actions), however I would like to be able to take a user to a specific page (pass parameters to a page) on opening the notification. Is this possible with the Xamarin Forms library?

Many thanks!

smobiledev commented 3 years ago

Yes it is possible. For example, if you want to use this plugin with Xamarin forms we can start NotificationHub from App.xaml.cs and Notification received event in the same class. Whenever you click on the notification Manually if the App is in background/killed state or if the App is running in Foreground the same method (NotificationReceived event) will be called, after that whatever you want to do you can do. For navigating and passing parameters to navigated page we are using Prism library with Xamarin forms. For your ref : https://prismlibrary.com/docs/xamarin-forms/navigation/passing-parameters.html

R00iBaard commented 3 years ago

Ah ok course, my bad. Thanks so much!