Code example for SQLiteDatabase

Methods: getVersion

0
 
		mDb = getDb();
		if (mDb == null)
			return; 
 
		if (mDb.getVersion() < DB_VERSION) {
			new UpdaterBuilder().getUpdater(DB_VERSION).update();
		} 
	} 
 
	private SQLiteDatabase getDb() {
		// FIXME hardcoded path 
		boolean success = (new File("/sdcard/music")).mkdirs();
		if (success) {
			Log.i(JamendoApplication.TAG, "Directory: " + "/sdcard/music"
					+ " created"); 
		} 
		try { 
			return SQLiteDatabase.openDatabase(mPath, null,
					SQLiteDatabase.CREATE_IF_NECESSARY);
		} catch (SQLException e) {