Reputation: 73
I am developing a web app on Ruby on Rails and an Android app. They have the same database structure, and now I want to sync the information between both apps. For this I am building a REST API on the rails app.
In the rails app I have devise for authenticating, but for the api I was trying to use doorkeeper which is a oauth2 provider, the problem is that I want to download all the users from the rails app to android app, and I want to give them the possibility to login in an offline mode, they can generate data in the offline mode, and after that, when they get online they will have to sync all the information with the web app. They also can generate data on the web app, so it has to be for both sides, to download information from the web app and to upload information to the web app. How can I achieve this? I have been reading a lot but I haven't found anything similar. I would really appreciate some help.
Upvotes: 2
Views: 1024
Reputation: 495
Sounds like you want to use a SyncAdapter (http://developer.android.com/training/sync-adapters/creating-sync-adapter.html). It supports background downloading/uploading and you can use that for your syncing process.
Upvotes: 2