public boolean saveHighScore(HighScore highScore) { try { mHelper.insertHighScore(highScore); return true; } catch (Exception e) { return false; } }
public void deleteDatabase() { mHelper.close(); mAppContext.deleteDatabase("presidents_quiz.sqlite"); }
public void deleteRowsFromHighScoreTable() { mHelper.deleteAllFromHighScoreTable(); }
public List<HighScore> getHighScores() { // Arrays.sort(mHighScores.toArray()); mHighScores = mHelper.queryHighScores(); return mHighScores; }
private QuizManager(Context appContext) { mAppContext = appContext; mHelper = new QuizDatabaseHelper(mAppContext); mPresidents = getPresidentResources(); mHighScores = mHelper.queryHighScores(); }