udacity / Sunshine-Version-2

The official repository for Developing Android Apps
Apache License 2.0
2.87k stars 4.41k forks source link

Does not sync Automatically - works when refreshed or location change #307

Open PraZ opened 7 years ago

PraZ commented 7 years ago

I have followed all the instruction as it was given in the tutorial. (I am attaching my SunshineSyncAdapter class here for reference) But when i run the app, it gets the data from the server the first time. But the the automatic sync does not happen. I have set the sync_interval to 30 seconds, and keep monitoring the logcat. But i don't see the "onPerformSync Called" log being printed every 30 seconds.

But when i "Refresh" or change location and come back, syncImmediately() function kicks off and updates the data. What am i doing wrong?

SunshineSyncAdapter.txt