15. Shared Preferences
The SharedPreferences class
provides a general framework
that allows you to save and
retrieve persistent key-value pairs
of primitive data types.
21. Garum - Model
@Pref(name = "app_status")
public class AppStatus extends PrefModel {
@PrefKey
public String appName;
@PrefKey
public int startupCount;
@PrefKey
public boolean showNotification;
}
22. Garum - Save
AppStatus appStatus = new AppStatus();
appStatus.appName = "Garum";
appStatus.startupCount = ++appStatus.startupCount;
appStatus.showNotification = true;
appStatus.save();