Last active
December 31, 2015 04:19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) { | |
try { | |
// Get the auth token for the current account | |
String authToken = mAccountManager.blockingGetAuthToken(account, AUTHTOKEN_TYPE, true); | |
ArrayList localTvShows = new ArrayList(); | |
Cursor curTvShows = provider.query(TvShowsContract.CONTENT_URI, null, null, null, null); | |
if (curTvShows != null) { | |
while (curTvShows.moveToNext()) { | |
localTvShows.add(TvShow.fromCursor(curTvShows)); | |
} | |
curTvShows.close(); | |
} | |
// TODO See what Remote shows are missing on Local | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment