By: James Burton
This program implements a database that keeps track of maintenance for your various vehicles. It can be used by an individual, a family, or a fleet/motor pool.
Add information into the tables on the screen. Each screen corresponds to a table in the schema.
Vehicle: Vehicle (e.g. Batmobile)
Item: Maintenance Item (e.g. Change the oil every 5000 miles or 6 months.)
Location: Service shop. (e.g. Jiffy Lube)
Receipt: All work done at a location, and date (e.g. Service at Jiffy Lube on 2/22/2014)
Work: Work performed (e.g. Change the oil as part of service done at Jiffy Lube on 2/22/2014 for Batmobile).
(Note: The menu option Create Data on the main screen creates a sample database for testing purposes.)
MySQL database schema:
SQLite database schema:
Changes for 0.2:
Timestamps were added, but not used. Also mileage was moved from Receipt table to Work table because of it’s association with a Vehicle.
This schema applies to both the internal and the external database. Data is stored on the external database and mirrored on the internal database for caching purposes. The only difference between the schemas is that are indices are only automatically generated on the external database.
Currently, the app assumes the external data is always right and the internal data is expendable. Data integrity is maintained by the internal SQLite database not being updated unless the external MySQL database has been successfully updated. A menu option on the main screen will force a refresh of the internal database from the external database.
- Should App automatically save changes or require you to press save button?
- Color for table selection highlighting. Default is Blue.
- URL location of scripts to access external database. Be sure to include trailing /
- Multiple color select on table screens.
- Detail screens for Work and Receipt tables.
- Image capture.
- File I/O. Receipt images are saved in Application directory on the external SD card.
- Database synchronization.
- Date Picker Dialog
- Image Selection from Android gallery
- Dynamically generated spinners
- Dynamic table generation
- HTML about page
- Multiple action bars
In addition to all the help I received from Car Maintenance 0.1.
Started with this http://developer.android.com/training/camera/photobasics.html BUT, the tutorial has an error. See http://stackoverflow.com/questions/13912095/java-lang-nullpointerexception-on-bundle-extras-data-getextras
Android Hive working with Camera API: http://www.androidhive.info/2013/09/android-working-with-camera-api/
Rotating images from http://www.higherpass.com/Android/Tutorials/Working-With-Images-In-Android/3/
Dialog to pick image from camera: http://stackoverflow.com/questions/10165302/dialog-to-pick-image-from-gallery-or-from-camera
How to delete a file: http://www.mkyong.com/java/how-to-delete-file-in-java/
Passing an object in an intent: http://www.tutorialspoint.com/java/java_serialization.htm
Preferences from http://developer.android.com/guide/topics/data/data-storage.html
Settings dialog derived from information at http://developer.android.com/guide/topics/ui/settings.html
Radio button in preferences: http://stackoverflow.com/questions/6148952/how-to-get-selected-text-and-value-android-listpreference and http://stackoverflow.com/questions/4966816/how-to-create-radiobutton-group-in-preference-xml-window
Everything you need to know about connecting an Android application to a MySQL database via PHP. BEST. TUTORIAL. EVER. http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/
Testing http POST/GET with curl http://stackoverflow.com/questions/1087185/http-testing-tool-easily-send-post-get-put
Workaround for truncating table that is a foreign key in MySQL: http://stackoverflow.com/questions/5452760/truncate-foreign-key-constrained-table
Eclipse PTI-PHP Tool integration plugin. Available in the Eclipse Marketplace. Update site is at http://www.phpsrc.org/eclipse/pti/
MacOS Mavericks built-in Apache server. Great for development testing.