android-asyncservice
android-asyncservice copied to clipboard
What is the best practices to do a network call every hour ?
I have used the AsyncService for the network calls which cache that data. Now I wanted to call this network service every hour and keep it in the cache so that if there is no network then data can be picked from the cache. What's the best practice to implement this solution ?
There's nothing in AsyncService to help you call some code every hour, so you should implement it yourself using something like the android AlarmManager
, and call your AsyncService from it. If you used @CacheThenCall
, the result will be cached.