You can really share preferences between applications. That is why it was called SharedPreferences.
What you need to do is make sure that both applications are signed with the same certificate, and both of them share the same SharedUserId in the AndroidManifest.xml file: read here .
This is due to the fact that you get SharedPreferences from
PreferenceManager.getDefaultSharedPreferences(context)
always MODE_PRIVATE.
However, in the application, you can also get the SharedPreferences object in context with the following:
SharedPreferences prefs = getSharedPreferences("my_public_shared_prefs", MODE_WORLD_READABLE);
which you can freely backtrack from another application with the following:
Context context = createPackageContext("my_target_app_package", Context.CONTEXT_IGNORE_SECURITY); SharedPreferences prefs = context.getSharedPreferences("my_public_shared_prefs", MODE_WORLD_READABLE);
Make sure that you do not store any personal information there, because this WORLD is read, which means that you and anyone else can read this data.
To finish, if you want to get the SharedPreferences of your old application, you will need to update the old application using the SharedUserId in the manifest file.
source share