简体   繁体   English

适用于Android的Xamarin.Forms通知服务

[英]Xamarin.Forms Notification Service for Android

I'm relatively new to Android app development and Xamarin.Forms development in general, so I'm looking for an advice on what is the best way to implement the following: When active, my app downloads data using a simple REST appi service (I'm using a HttpClient for this). 我对Android应用程序开发和Xamarin.Forms开发相对较新,因此我正在寻求有关实现以下最佳方法的建议:活动时,我的应用程序使用简单的REST appi服务下载数据(我为此使用HttpClient。 Now what I want is when the app is closed, to still check if some data is changed on the server, using the same method as it was used when the app is running, and if so, to fire up the notification to the user. 现在我想要的是关闭应用程序后,仍然使用与应用程序运行时相同的方法来检查服务器上的某些数据是否已更改,如果是,则向用户发送通知。 I've been reading about the services, and that seems like a solution to my problems, but what I need to know is: what kind of service is most suitable for this task? 我一直在阅读有关服务的内容,这似乎是解决我的问题的一种方法,但是我需要知道的是:哪种服务最适合此任务? Is it a Bound service, Intent service or Started service? 它是绑定服务,意图服务还是已启动服务? Or is there a way to achieve this without the use of the service? 还是有一种无需使用服务即可实现这一目标的方法?

天蓝色的通知中心发送到苹果和谷歌播放

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM