views:

54

answers:

1

Hi,

I am currently struggling with the concept of sqlite databases in android. I cannot find a definitive guide to setting up creating and using the database, and even if I had I still haven't got a clue how to store and reference urls and map coordinates. I have found and example that creates a database of information before it starts.

Would it possible to create a database of items using a java class then use the database as normal, if so would I have to run the code at the start of the program each time or could it just be run once then saved and used.

+2  A: 

Take a look here: http://developer.android.com/guide/topics/data/data-storage.html#db

You should use a custom class extending SQLiteOpenHelper: http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html

It gives you methods like onCreate, onOpen and onUpgrade which are very useful.

WarrenFaith