I'm using a syncadapter in my application. I need it to trigger an event every day, at 6 AM. Is that possible?
Is there a way to trigger a syncadapter event every day at a given time?
Thanks!
This may help: ContentResolver.addPeriodicSync()
This, too: Transferring Data Using Sync Adapters
Or, you can always trigger a sync yourself: ContentResolver.requestSync()
However, I advise against doing a requestSync() unless you're dead certain that you need to sync with a server every day at 6 AM regardless of what's happened with the data. The point of a sync adapter is that the system helps you keep your device up-to-date without wasting battery. If you keep turning WiFi or data access off and on to do syncs, you're using far more battery than if you let the sync adapter framework schedule everything for you.