Reputation:
Am I doing this wrong? The preferences file is empty
Preferences prefs = Gdx.app.getPreferences("My Preferences");
prefs.putBoolean("debug",true);
prefs.flush();
Upvotes: 3
Views: 839
Reputation: 6221
To work properly the filename of the preferences should not contain whitespaces. So the fix in your case is:
Preferences prefs = Gdx.app.getPreferences("MyPreferences");
prefs.putBoolean("debug",true);
prefs.flush();
Upvotes: 2