Reputation: 973
I want to download multiple apk
files from server using background service but confused about implementation
What could be the proper way to do that? Should I create a service and download these apks using downloadmanager or should I use service with libs like volley or asyncHttpClient to download apks?
and one more thing that i want is, every 1 hr i want to check for any new apks are available on server
Should i use handler that post every 1hr or should use alarm manager to do that
please help
Upvotes: 0
Views: 46
Reputation: 488
The simplest way to download the files is to use DownloadManager
, if it fits your needs.
For the second problem you shouldn't use handler, as your app may be killed by the system. So, use AlarmManager
, but note, that after reboot all alarms are cleared.
Upvotes: 1