I am doing push notifications in Windows 10 universal using C# and XAML. Everything is working perfectly. When I receive a notification and the app is running I use this function to do something when the notification comes in.
private async void Channel_PushNotificationReceived(PushNotificationChannel sender, PushNotificationReceivedEventArgs e)
{
e.Cancel = true;
//do something in reaction to the notification
}
But when the app is in the background I get a toast notification in the form of a badge. When I click that the app opens to the last page it was on. However what I want to do is when the badge is clicked I want to be able to call a function in my code. How do I do this?