【发布时间】:2014-06-07 14:29:32
【问题描述】:
我正在开发一个拥有自己的数据库并将通过 GCM 与后端同步的应用程序,我正在考虑使用后台服务,但我不确定这是否是正确的思考方式,所以,如果您能告诉我以下内容是否正确,我将不胜感激,如果不是,请说明我需要分步做什么或应该如何考虑?不需要代码。
当应用没有运行/活动活动时,假设 GCM 有负载并且不需要联系后端,
1. Backend had new data and sent it with GCM
2. Background service received it and updated the DB
应用当前运行时
1. Backend had new data and sent it with GCM
2. Background service received it and updated the DB and notifydatasetchanged
3. Data on activity will be changed as the source has changed(e.g listview update it's items)
【问题讨论】:
标签: android intentservice