saving data update service for an android app
I am building an android app for fetching internet data and rendering it as a list. The data is changing every minute, so I made a service and used a Timer to load the data with an interval.
My question is that:
Any ideas?
onPause
(and resume in onResume
). To elaborate on 1: I understand you're saying "app", not "a particular activity", but your best bet is to use Activity.onPause
and Activity.onResume
. If anything, you can add a short delay so that nothing happens if onPause is followed immediately by onResume.
上一篇: 我怎样才能防止进程(脚本)在Android中暂停(冻结)?
下一篇: 为android应用程序保存数据更新服务