Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Allow syncing in the background #103

Open
1 task
vickychijwani opened this issue Sep 1, 2015 · 3 comments
Open
1 task

Allow syncing in the background #103

vickychijwani opened this issue Sep 1, 2015 · 3 comments
Labels

Comments

@vickychijwani
Copy link
Owner

vickychijwani commented Sep 1, 2015

Until this is implemented, there will always exist a high possibility of bugs like this:

  1. User makes significant edits to a post
  2. A phone call comes in, app goes to background, edits are saved but not synced to the server
  3. User does not open the app for several days
  4. In that period, someone else (or this same user) makes some edits to the same post through the web interface -- at this point the user may notice their several days old edits have not appeared yet!
  5. Now the user opens the app and a sync occurs -- this will end up overwriting the remote copy with edits in step 4 with the old edits!

Concerns to take care of:

@vickychijwani vickychijwani added this to the 1.0 milestone Sep 1, 2015
@vickychijwani
Copy link
Owner Author

This sample offline architecture may help (presented at the Android Dev Summit architecture talk): https://github.com/yigit/dev-summit-architecture-demo

@vickychijwani vickychijwani removed this from the 1.0 milestone Apr 27, 2016
@vickychijwani
Copy link
Owner Author

Removed from 1.0 as this is a pretty big change.

@vickychijwani
Copy link
Owner Author

vickychijwani commented May 24, 2016

GCM Network Manager looks like the best way to do this: it's convenient, flexible and conserves battery. Here's a great overview: https://www.bignerdranch.com/blog/optimize-battery-life-with-androids-gcm-network-manager/

It should be noted that with GCM moving over to Firebase, the GCM Network Manager will eventually be superseded by Firebase Job Dispatcher.

UPDATE: Yigit Boyar's Priority JobQueue library might also be helpful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant