Using java Syntax Highlighting
- public class DatabaseManager extends ContentProvider {
- private static final String TAG = "DatabaseManager";
- private static final String DATABASE_NAME = "fitroid.db";
- private static final int DATABASE_VERSION = 1;
- private static final String DATABASE_STARTER_FILE = "input_" + DATABASE_VERSION + ".sql";
- ...
- ...
- private static final UriMatcher sUriMatcher;
- /*
- * This class helps open, create, and upgrade the database file
- */
- private static class DatabaseHelper extends SQLiteOpenHelper {
- DatabaseHelper(Context context) {
- super(context, DATABASE_NAME, null, DATABASE_VERSION);
- }
- @Override
- public void onCreate(SQLiteDatabase db) {
- db.execSQL(createYourFirstTableString());
- db.execSQL(createYourSecondTableString());
- db.execSQL(createYourThirdTableString);
- /**** Test File Openning here ***************
- //final String TESTSTRING = new String("Hello Android for Invigor");
- //FileOutputStream fOut = openFileOutput("samplefile.txt", MODE_WORLD_READABLE);
- How can I place such a call here !!
- getContext().getAssets().open(DATABASE_STARTER_FILE) // DOES NOT WORK - due to static class
- I need to load values from my sql file to the database here !!
- ******* End Testinf file openning *****************/
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4



