Search code examples
javaandroidloader

Restarting Loader every 30 seconds


Is it possible to program a Loader to restart periodically, say every 30 seconds? And would this be effective? What if the previous load hadn't finished within the 30 second time limit?

Thanks,

Izzy


Solution

  • This would not be effective, loaders are designed to restart when the underlying data changes. So your best bet is just to set it up and update your view whenever it reloads data, it'll handle knowing when to do that for you.