1

Hi I'm new to android studio and looking for some answers

I'm currently creating an app that has a SQLite database, the user can add/edit/delete data accordingly

What I want is if the user adds a entry to their database on their phone, if they then go on their tablet the new entry will get synced and be displayed and vice versa

Is there a standard / recommended way of doing this?

Thanks

2 Answers 2

1

Recommended way of doing this is Sync Adapters.

you will also have to get knowledge on webservices and server programming to be able to store data on servers and expose it to users.

there are some third party solutions like Parse are available which can be helpful .

Sign up to request clarification or add additional context in comments.

Comments

0

The second way might be using Google Drive, the app Folder.

There is a lot of info about here.

Pros of this method:

  • You don't store user data at all, so (I think) there is no need of Confidentiality policy.
  • You do not rely on any 3rd party services.
  • Users can easily delete all data.

Cons of this method:

  • Google Login integration is required.
  • Slow
  • You'll have to figure out how to merge your database with file from server.

The algorithm for getting data:

  • Get file from Drive App Folder.
  • Check if it is valid file of your app DB (create some system table
    inside DB, and check if it exists)
  • Merge changes with app DB.

The algorithm for sending data:

  • Get data (make sure that you have latest sync).
  • Merge changes.
  • Send (Rewrite) file to Drive App Folder

Good luck!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.