Skip to content

Instantly share code, notes, and snippets.

@Axxiss
Created May 21, 2012 13:25
Show Gist options
  • Save Axxiss/2762303 to your computer and use it in GitHub Desktop.
Save Axxiss/2762303 to your computer and use it in GitHub Desktop.
Log synchornization
public static void syncLog(Context context, String user, String authToken) {
Log.i(TAG, "Syncing VisioStorm log");
ContentResolver cr = context.getContentResolver();
Cursor cursor = PendingMovie.getAll(cr);
API.setUser(user);
API.setAuthToken(authToken);
if (cursor.getCount() > 0) {
while (cursor.moveToNext()) {
PendingMovie pending = new PendingMovie(cursor);
pending.upload(cr);
}
}
cursor.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment