I am completely new to Android development and have been reading many articles on the Android site and elsewhere. There are a lot of articles that give very specific examples, but I haven’t bumped into the articles explaining the following:
Logging-In:
I haven’t noticed market applications forcing me to create login credentials (per se), only verification of access to types of permissions. However, they surely must need some kind of login credential. This means Android is providing this access (somehow).
How?
What process?
Database Location:
Some articles I’ve read “imply” a copy of the applications database is located on the phone (itself), others imply a database located elsewhere (cloud etc.). Lastly, others imply they use both a local database for quick updates and a remote database for synching and error-analysis.
Is there a common database available for everyone to use?
- I wouldn’t “think” so
Do you generate the local copy automatically every time?
- Seems wasteful as you just have to re-create the whole thing and re-synch EVERY entity…but I’ve seen articles promote it.
Which databases are you using?
What best-practices do you use for synching?
Lastly:
If this forum isn’t the right one I will be happy to move this question. I looked at the Android Enthusiast forum and it didn’t look like the correct one either.
Logging in, I guess you want to take a look at AccountManager. However, since it’s only available after API lvl 5 I am not sure how to do with previous versions since I haven’t used it myself. http://developer.android.com/reference/android/accounts/AccountManager.html
Databases, for the applications that uses databases that I’ve done I have always used a local database on the device itself since the information has only been interested in one-way IE downloading and synching the device from web services.
For syncing both ways I would probably look at having variables which holds when the database were last updated so you know how much and what you need to update in order to have a fresh copy of the database. And then poll a web service to see if the user should update it’s database or not.