Xamarin表格的本地通知?

S. *_*nke 6 c# notifications xamarin xamarin.forms

我正在学习如何使用Xamarin表单,我想在Xamarin Forms上实现(推送)通知.我用Google搜索但无济于事.有谁知道如何使用Xamarin Forms实现本地/推送通知?我将在以后使用实际的服务器,但现在只是在我按下按钮时显示通知,对我来说完全没问题.

谢谢你的帮助!

编辑:

我现在使用DependencyService来访问Device OS的通知系统,而不是尝试使用Xamarin Forms本身.不再需要这个问题的答案了!

Joe*_*air 5

Xamarin的文档包含通知指南:

https://developer.xamarin.com/guides/cross-platform/application_fundamentals/notifications/

它涵盖了本地和远程通知,包括用于处理发送推送通知的库(例如,PushSharp,UrbanAirship)的建议.


小智 5

您可以使用https://www.nuget.org/packages/Xam.Plugins.Notifier插件获取本地通知。这是我在 Xamarin Forms 中使用过的最好的插件之一。


小智 5

您还可以尝试 Xamarin Forms 的本地通知插件https://www.nuget.org/packages/Plugin.LocalNotification/。它具有更多功能,如果您要实现自己的版本,请查看源代码。