I apparently do not have enough reputation to add a comment and request clarification on a topic, so I will have to re-add the question here.
According to the link: Can't put double SharedPreferences
The top rated answer has the best way to return a double from sharedpreferences as:
double getDouble(final SharedPreferences prefs,
final String key, final double defaultValue) {
return Double.longBitsToDouble(prefs.getLong(key, Double.doubleToLongBits(defaultValue)));
}
I am having trouble identifying what goes into the parameter defaultValue
. Is this parameter supposed to be a variable doing in (like a double) that the original value was? Is it unique to my class? What is it?
If possible, would someone mind giving an example so I can understand it a bit better?
Thanks!