我有Win 10通用應用程序,它基於應用程序中的各種事件顯示吐司通知。Windows 10通用XAML吐司通知
我的問題是,只有當應用程序處於活動狀態時纔會顯示敬酒通知(它不會最小化任務欄)。
我需要應用程序來顯示通知,當我使用任何其他應用程序。 我的下面設置:
吐司調用代碼:
private void DisplayNotification()
{
string toastXmlString = "<toast>"
+ "<visual version='1'>"
+ "<binding template='ToastText04'>"
+ "<text id='1'>Header</text>"
+ "<text id='2'>Line 1</text>"
+ "<text id='3'>Line 2</text>"
+ "</binding>"
+ "</visual>"
+ "</toast>";
Windows.Data.Xml.Dom.XmlDocument toastDOM = new Windows.Data.Xml.Dom.XmlDocument();
toastDOM.LoadXml(toastXmlString);
// Create a toast, then create a ToastNotifier object to show
// the toast
ToastNotification toast = new ToastNotification(toastDOM);
ToastNotificationManager.CreateToastNotifier().Show(toast);
}
任何人都知道這是爲什麼?
如何發送您的Toast通知?從Azure,後臺服務等 –
從Windows通用應用程序,應用程序刷新數據在設定的時間間隔,並根據我希望它顯示一些敬酒的結果。 –
您在背景中設置的間隔時間有多長? –