0
我正在使用C#和XAML在Windows 10通用中推送通知。一切都很完美。當我收到通知和應用程序運行時我用這個功能做一些事情時,通知的用武之地。如何處理應用程序未激活時的通知?
private async void Channel_PushNotificationReceived(PushNotificationChannel sender, PushNotificationReceivedEventArgs e)
{
e.Cancel = true;
//do something in reaction to the notification
}
但是,當應用程序在後臺我得到一個徽章的形式Toast通知。當我點擊時,應用程序打開到最後一頁。然而,我想要做的是點擊徽章時,我希望能夠在我的代碼中調用函數。我該怎麼做呢?