Home‎ > ‎android‎ > ‎Contact Database Application‎ > ‎

Application Design


This contact application use a private database with one table. its database name isContactDB, with one table name mycontact. Because we want to study from simple, we use a minimal field input. below is a structure of mycontact table:

NoFieldTypeDescription
1_idintegerprimary key
2NametextContact Name
3addresstextContact Address
4mobiletextContact Mobile Number
5hometextContact Home Number

All manipulation query for this table handled by DBHelper class, include table creation, querying, updating, and deleting record.

At first Activity, it just instantiate the DBHelper wrapper with it context as a parameter. The wrapper will check if ContactDB is exist. if not, it will create the db first and create the table.

The Application will show a contact list first, and from the screen User will have choices to do:

1. Add New Contact
a. Show ContactEdit with ACTIVITY_CREATE flag
b. On Contact Edit, input some information, and save when done
c. Contact List shown with newly contact added.

2. Edit Current Contact
a. Edit Contact can be perform just by clicking contact from 
contact list in the first screen.
b. Show ContactEdit with ACTIVITY_EDIT flag
c. On Contact Edit, edit some information, and save when done
d. Contact List shown with modified contact has been done.

3. Delete Contact
a. Active Contact will be deleted
b. Contact List refreshed.


Was this information helpfull?

Comments