• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps SQLite Database

Petedrn

Lurker
Hey all,

I am fairly new to Android programming and really need some help. I tried google but all I found was just too messy for me :)

I want to be able to save, update and delete things in a SQLite database. I use "SQLite Database Browser 2.0 b1.exe" to create the database and all necessary tables. But there my problem starts.

Where do I have to copy the database file?

and

how can I connect with it to save, update and delete items?
 
Hey all,I am fairly new to Android programming and really need some help. I tried google but all I found was just too messy for me :)I want to be able to save, update and delete things in a SQLite database. I use "SQLite Database Browser 2.0 b1.exe" to create the database and all necessary tables. But there my problem starts.Where do I have to copy the database file?andhow can I connect with it to save, update and delete items?
Android databases directory of certain application is /data/data/yourpackagename/databases/, but android use other scheme of creating, upgrading and using databases. You need to extend class SQLiteOpenHelper and to override methods onCreate and onUpgrade and then you need to use this class for creating database connections by using methods getReadebleDatabase and getWritableDatabase.
 
Back
Top Bottom