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