To create the database create a class with name BabyNamesDBHelper which extends SQLiteOpenHelper and then call the super class constructor, passing database name and version as arguments. In this case will get details about “andrew” as below.Ĭreate a SQLiteDatabase with name baby_names_database. Now, if we click on a name, let us be the first one “andrew” in the above screen-shot, we have to get some details about the name. Here is the screen-shot of the emulator after clicking on the Button. When we click on the highlighted button - “Common Names”, it will displays a list of all the names present in “common_names” which is a SQLite database table we will create for this app. When ever you launch the App, it will shows a Menu of items as below. In this post I would like to show how to work with a simple pragmatic example : Baby Names App.īefore writing the code, let me show you some of the screen-shots of Baby Names App, which requires interaction with the database. In addition it requires only little memory at runtime (approx. Android embeds an Open Source Database called SQLite, which supports standard relational database features like SQL syntax, transactions and prepared statements.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |