I have two activities A and B. Activity A has a form and by clicking on submit button it saves the form data into shared preference. Activity B has to retrieve data from the shared preferences saved by activity A. I went through so many forums and got suggestion to uses getSharedPreference(Filename,Mode) instead of getPreference(Mode). But still it does not work. Is there any other method to do this job instead of creating a class in activity A specially to extract shared preference values for public use.
Please suggest a perfect solution for this. I even used the mode as WORLD_READABLE.
I think the problem is that the editor is not actually committing changes due to how you are opening your
SharedPreferences.Change
MODE_WORLD_READABLEtoContext.MODE_PRIVATEand see if that helps.