lundi 14 septembre 2015

Android offline & online database

Greetings from Venezuela, this is my first post here and my first app as well :)

Lately I've been reading around, teaching myself how to code for Android (only a little bit of previous experience with coding in general) and while I've managed to move along by myself, sometimes you just have to be humble and ask for help to move faster.

In my current project I will need tables:

1) in the cloud (sytem data):

a. user accounts.

b. two large tables which are the backbone of the app and the same for every user.

and

2) in cloud/memory hybrids (user data):

a. tables filled with the user's input. Ok, the following is a fairly simple concept but it can get hard to explain, so bear with me:

  • I want the user to be able to use his/her previously saved data from any device via the account. This means that data would have to be in the cloud.

  • I want this data to be accesible by the user even when there's no internet (given the fact that the user is already "logged in" in the cache, since logging in would require internet), that would require the data to be stored in memory. They would have the chance to see/edit it and then when the internet is back the app would update the data in the cloud.

So the user data in the app would always be runing on the locally stored version, the one in the cloud is just for downloading a copy of it to the device in case it doesn't have one or it isn't up to date.

Now, user data needs to interact with the two large tables I mentioned from system data in order to run querys between them, the resulting data would then be used to automatically create/fill a third set of tables.

How would you handle this scenario?. I've read about Parse.com for user registration and SQLite for offline databases, but not both at the same time.

Thanks

Aucun commentaire:

Enregistrer un commentaire