MarschOSX / Responder

Senior Design I project for an Android auto-response application
0 stars 0 forks source link

Create DataBase #20

Closed gabowser closed 8 years ago

gabowser commented 8 years ago

For minimally working system, need the following functions;

Data Base

Settings

Event Log

gabowser commented 8 years ago

http://developer.android.com/reference/android/database/sqlite/package-summary.html

gabowser commented 8 years ago

The database is created and accessed through a helper class DBHelper and managed by DataBaseManger

Also I have added the following functions to the DataBaseManager class

gabowser commented 8 years ago

The database has been restructured. The database is retrieved via the DBProvider class that can return either the actual database or a mock database the only exists in main memory and will be deleted upon closing the app.

If the event handler or listener try to use the mock database after the app has been closed, it will only get the default values generated by the class constructor

All public functions for the database (mock and actual) need to have their signature within the DBInstance interface

gabowser commented 8 years ago

Example of accesing database:

//true if using test db, false if permanent db DBInstance db = DBProvider.get instance( false, context); String message = db.getReplyAll();