In my app I get a bug that makes me unable to load the SharedPreferences. The reason this happens is that when the applications is killed for good(task killer or phone restart) the phone can not load everything again. For now I am using this technique:
if ((sharedPreferences.getString("EXA1", "")) == "Example1"){
//do something
}
else if ((sharedPreferences.getString("EXA1", "")) == "Example2"){
//do something
}
else if ((sharedPreferences.getString("EXA1", "")) == "Example3"){
//do something
}
else{
//do nothing
}
Since I got around 75 else if statements my phone refuses to load them after the app is killed. Are there any more efficient way of loading and then do something?(Note: I got more then one single SharedPreference)