Reputation: 2216
I've followed the Udacity Developing Android Apps Course found at https://www.udacity.com/course/ud853. In section 6 it teaches you how to build a sync adapter for your app closely the following the creating a sync adapter training found at http://developer.android.com/training/sync-adapters/creating-sync-adapter.html.
They build an example app to demonstrate the process which can be found at https://github.com/udacity/Sunshine-Version-2. The branch that contains the sync adapter code is 6.05_scheduled_sync. I have checked out this branch and run the code on my devices (I've tried 2). There is a refresh button that is for testing and if you press that the app downloads data. However if you do not press this and leave it to sync for itself it doesn't(at least it doesn't on my devices!). It should sync because in the code they get it to do an immediate sync. What could be wrong here? Could there be something wrong with the settings on my devices?
Upvotes: 2
Views: 271
Reputation: 2216
Uninstalling the app first appears to have fixed the problem.
If I have this right the code works by creating an account and then starting the syncing service. But if the account is already there it doesn't bother. Hence by uninstalling first you force it to recreate the account and then start the syncing service.
Upvotes: 3