I am using SharedPreferences to store user settings/options.
I have added a new option that can be on or off and so want to store this as a boolean in my shared preferences file.
That is all good, however as this is a new option I want to set my internal variable to null if the option hasn't been explicitly set by the user (this way I can prompt for their choice when the new version is run for the first time).
The following doesn't work because getBoolean expects the primitive boolean as the default value to return if the preference isn't foudn in shared+prefs.
myNewSetting = shared_prefs.getBoolean("my_mew_setting",null);
In the above myNewSetting is a Boolean which can be set to null, but this doesn't help because of getBooleans requirements.
Is there any way around this?