Windows.UI.Notifications.ToastNotification API not supported in Windows Phone Silverlight 8.1?

喜你入骨 提交于 2019-12-24 03:33:48

问题


I'm trying to certify my application but I get the following errors: Error Found: The supported APIs test detected the following errors:

This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotification. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotification..ctor. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotification.put_SuppressPopup. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotificationManager. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotificationManager.CreateToastNotifier. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotificationManager.GetTemplateContent. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotifier. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastNotifier.Show. Module=. File=X.Service.dll.
This API is not supported for this application type - Api=Windows.UI.Notifications.ToastTemplateType. Module=. File=X.Service.dll.

Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Phone Store apps violates the Windows Phone Store certification requirements.

However if you check these msdn pages you can see that it is clearly supported in WP 8.1 Silverlight: http://msdn.microsoft.com/library/windows/apps/windows.ui.notifications.toastnotification.aspx http://msdn.microsoft.com/en-us/library/windows.ui.notifications.aspx

Minimum supported phone Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Anyone else had this issue?


回答1:


I've found the issue. It's in the WMAppManifest.xml, you have to select WNS if you want to use Windows.UI.Notifications otherwise you have the use ShellToast. Check this page out:

http://msdn.microsoft.com/en-us/library/windows/apps/dn642085%28v=vs.105%29.aspx



来源:https://stackoverflow.com/questions/25230959/windows-ui-notifications-toastnotification-api-not-supported-in-windows-phone-si

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!