I\'m getting a very weird error.
I have 2 activities. On both I\'m getting the SharedPreferences using MODE_PRIVATE (if it matters) by sp = g
The line sp.getBoolean(IntroActivity.SHOW_INTRO, true)// this line returns a String value.
so you have to do as given below,
String flag=sp.getBoolean(IntroActivity.SHOW_INTRO, true);
if(flag.equalsIgnoreCase("true")){
boolean showIntro = true;
}else{
boolean showIntro = false;
}
Try this it will definitely works.