Skip to content
This repository

Sync with multiple sources #215

Open
aperomsik opened this Issue April 24, 2012 · 5 comments

2 participants

Aaron Peromsik Henning Weiss
Aaron Peromsik

Would be nice to be able to sync both my work and home org files. They don't overlap. To do this I guess multiple instances of sync plugins need to be configured and the contents of the indexes merged, or else listed under a parent node as "home" and "work". Also would be nice to be able to say don't try syncing the work files unless I am connected to work's wifi.

Henning Weiss
Collaborator

Yeah, I thought about some similar functionality which I called "sync profiles". Will be implemented at some point in the future.

Aaron Peromsik

Plenty of work remains, definitely not ready for a pull request, but code on my multiprofile branch seems to be more or less working. Curious to hear what you think of my approach.

Henning Weiss
Collaborator

On the first glance it looks fine. I would say a couple of cleanups and some testing and we can merge it.

Aaron Peromsik

It seems that it would be a lot of work to augment all the content provider URIs with a source number. But without that, or at least a carefully selected subset, bad things could happen if the user switches sources while a sync is in progress. Is there another way to avoid that situation? Or is it possible to abort a sync if the user wants to switch sources?

Aaron Peromsik aperomsik closed this January 09, 2013
Aaron Peromsik aperomsik reopened this January 09, 2013
Aaron Peromsik

[whoops, misread the close button.]

@hdweiss wrote elsewhere:

Personally, I think it would make sense to be able to manipulate the profiles through the wizard. After choosing the synchronizer type, the user could be presented with an additional wizard page that lets the user create or edit profiles. When setting synchronizers up the first time this should probably be hidden to prevent new users from being confused.

There could be profiles of different types. I don't think it makes sense to segregate them by type.

Have you tried my branch? If you never create a second source, you don't see anything different from today, aside from the "add source" button in the settings activity. (Except that the "switch sources" button might mistakenly still be displayed even if only one source is defined, but if so, that's just a bug.) You get a second profile by choosing "add sync source" in the main page of settings. That puts you into a different settings activity which can summon its own instance of the wizard, writing into a different SharedPreferences database.

Once multiple profiles exist, if you pick the Settings button, you get a list of profiles, and you have to choose which one you want to edit-- then you get a new SettingsActivity backed by the SharedPreferences for the source you selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.