udacity/Sunshine-Version-2

Does not sync Automatically - works when refreshed or location change

PraZ opened this issue · 0 comments

PraZ commented

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