Enable Data Sync On Demand


By chance would it be possible to enable cloud sync on demand from Android client instead of through gradle file. By this I mean, that the user starts to use the app and data is persisted locally, then if the user wishes to enable sync then a login workflow is presented to the user and then sync is enabled after that?


Is the goal here to essentially only enable sync for paying users? You could accomplish something like this today by using local realms. When a user decides to enable sync, you would then copy over the local realm data into a synced realm.


That is the goal. I will have to figure out how to make a local Realm and sync Realm live side by side. Thanks


We faced a similar issue @valokafor. Have you considered how to handle users who pay for a while, have their data synced, then stop paying for a while, then resume paying?

When they resume paying do you sync the data they generated while they did not pay? If not, does this create inconsistencies?

We decided to deal with the issue by syncing everyone, but limiting some of the functionality of the client app to paying customers so that while they are not paying they are unable to generate billable data.


Did you have to require your users to all create a username and password regardless of whether or not they were using sync?


@cliftonlabrum Our design requires all of our users to be sync users with username password. The cost of non-paying users is quite low as we limit the functionality of the app for those users which limits the amount of sync. In general terms we allow non-paying users to save and therefore sync their settings, but not their transactions.


@Nosi thanks for sharing your insight. My app is a utility app and I have seen uninstall spike since I begin to require users to login. People get frustrated when they face a login wall after installing the app so I am trying to make login optional say after upgrade.

At this point, I working towards offline Realm and performing sync with Firebase Datastore, I hate that I have to do it, but I have to deal with the available tools as they are.


I just wanted to update you to let you know that this item has made its way onto the roadmap and that we are working on a few implementations which should help enable your use case.


Great news, @mgeerling where can I take a peek @ the roadmap, I am totally blocked on this issue.