views:

76

answers:

1

Hi there,

I'm developing an application that would need to persist data locally in Android devices. I'm aware that Android provides two packages for database persistence, the normal "java.sql" and the "android.database.sqlite"? Which one is used more for persistence? I suppose that "android.database.sqlite" is the implementation of "java.sql", right?

+1  A: 

SQLite is more than enough for most apps that require local persistence. android.database.sqlite is Android's implementation of SQLite, which is a tiny DBMS that uses a simplified version of SQL.

This simple tutorial should point you in the right direction:

http://www.screaming-penguin.com/node/7742

If you're dealing with binary data, you can always save it to the SD card using the usual Java File persistence.

And if you just want to save a few user preferences, skip SQLite altogether and use the PreferencesManager.

hgpc