@Override public void weaponDataRetrieved(int[] weaponArray) { weaponDb.deleteAllExceptRow(1); weaponDb.updateAll(weaponArray, 1); armorDb.deleteAllExceptRow(1); armorDb.updateAll(1, 1, 1, 1, 1); statsDb.updateAll(1, 0, 15, 15, 15, 15); achievementDatabase.deleteAchievements(); }
@Override protected void onDestroy() { characterdataDb.close(); weaponDb.close(); statsDb.close(); armorDb.close(); itemDb.close(); achievementDatabase.close(); super.onDestroy(); }
private void initDB() { characterdataDb = new CharacterdataDatabase(this); characterdataDb.open(); weaponDb = new WeaponDatabase(this); weaponDb.open(); statsDb = new StatsDatabase(this); statsDb.open(); armorDb = new ArmorDatabase(this); armorDb.open(); achievementDatabase = new AchievementDatabase(this); achievementDatabase.open(); itemDb = new ItemDatabase(this); itemDb.open(); }