Broadcast receiver / service in Android vs. iPhone

霸气de小男生 提交于 2019-12-11 01:38:47

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/8770566/broadcast-receiver-service-in-android-vs-iphone

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