Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

About databases, Android applications use SQLite natively. So if you need local storage you can just use it.

Applications that need to sync with an external database probably cache a number of query results and re-do the queries when needed, since it's uncommon you need the whole database locally (do yo make a local copy of a website database each and every time you use a web application inside your browser?)

For example, Twitter queries the central server when needed and keeps a cache of past tweets.

About credentials, roughly speaking every application you install creates its own user, so it doesn't really need to know any login credential, because it can use only its own user. Think of it as a kind of sudo.

share|improve this answer
    
Thank you so much! –  Prisoner ZERO Aug 17 '11 at 11:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.