Preferences prefs = Gdx.app.getPreferences("My Preferences");
Ustawianie i odczytywanie własności (np. ustawień programu):
prefs.putString("name", "Donald Duck"); String name = prefs.getString("name", "No name stored"); prefs.putBoolean("soundOn", true); prefs.putInteger("highscore", 10);
Zapisanie danych:
// bulk update your preferences prefs.flush();
W systemie Android dane aplikacji zapisywane są za pomocą systemowego mechanizmu SharedPreferences.
Brak komentarzy:
Prześlij komentarz