I think the problem is that the editor doesnβt actually make any changes due to the way you open your SharedPreferences .
SharedPreferences.Editor editor = getSharedPreferences("udata",MODE_WORLD_READABLE).edit();
Change MODE_WORLD_READABLE to Context.MODE_PRIVATE and see if that helps.
Jon willis
source share