Android与iPhone的广播接收器/服务 [英] Broadcast receiver / service in Android vs. iPhone

查看:92
本文介绍了Android与iPhone的广播接收器/服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android中有一个应用程序,该应用程序具有广播接收器,该接收器每天清除所有现有警报并触发新的重复警报,从而启动服务以显示通知。这都是在后台完成的,应用程序未运行。



由于Apple的后台服务指导,如果允许这样做,我真的不理解iPhone文档。 / p>

这一切在iPhone中都可行吗?怎么样?我可以每天运行某种广播接收器,然后启动服务以显示日期是否满足某些要求的通知,如果日期不符合要求,则取消该通知。



感谢任何帮助

解决方案

查看本地/推送通知。当应用程序未运行时,它们是您可以在iOS中定期/远程执行某些操作的唯一方法。但是它们都向用户显示通知,如果您不想打扰用户,这将是不好的。而且由于电池问题,iOS中没有像iPhone那样的广播接收器。


I have a application in Android that has a broadcast receiver that clear any existing alarms and triggers a new repeating alarm, daily, which starts a service to show a notification. This is all done on background, app not running.

I really don't understand the iPhone docs if this is allowed due the "background service" guidance by Apple.

Is this all doable in iPhone? How? Can I have some sort of broadcast receiver running every day, then start a service to show notification if the date meets some requirements, and cancel it if not.

Thanks for any help

解决方案

Look at Local/Push Notification. They are the only way you can periodically/remotely do something in iOS when application is not running. But both of them show notification to user and this is not good if you don't want to disturb user. And also there is no Broadcast Receiver in iOS as in iPhone due to the battery issues.

这篇关于Android与iPhone的广播接收器/服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆