I'm trying to save information on an Android app I've made. I want to save a name, "Robert". For this I've been looking into Shared Preferences and I can't find a tutorial that explains how to create SharedPreferences.
All tutorials start like this:
SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
But they don't explain where the getPreferences() take the object from.
When is this object (SharedPreferences object) created? Is it created along with the context? Is it created together with each activity?
I'm pretty new to Android, but an intermediate(minus) Java programmer.