So I'm completely new to Java and Android development but I'm extremely interested in creating some awesome stuff for the platform. I decided to start with something that I do know pretty well: databases. The first thing that I noticed in all of the tutorials and snippets that I could find is that most people utilize the SQLiteOpenHelper or create their own function that handles their database. I wanted to take a sort of hybrid approach because the idea behind the Open Helper is extremely solid but I really didn't like that it forces you to store everything on the phone.
My goal was to write a helper from scratch that retained pretty much all of the functionality of the original but added the ability to save the file onto the SD Card. Whether the database is external or not is defined simply with a boolean flag in the constructor. I made it a point not to hard-code the external location as I wanted Android to store the file dynamically based on the application. This also makes sure that the database is deleted upon application removal by default (I suppose I could add in the functionality to persist the database somehow but I believe that's something that should be done within the application itself).
Anyways, I'm pretty happy with what I came up with so far and I wanted to solicit feedback from people who actually know what their doing in the world of Java and Android. This is my first Java project outside of Hello World so I really want to know if I'm understanding the concepts and syntax. Fire away!
The OpenHelper class:
The Database class:
Here is the actual source exported from Eclipse (it's a lot prettier and easier to read IMO).