0

If an application has saved data using SharedPreference like this:

SharedPreferences.Editor preferencesEditor = getDefaultSharedPreferences.edit();
preferencesEditor.putInt("count", mValue);
preferencesEditor.apply();

can an other application have access to these data after reboot like this for example:

SharedPreferences sharedPref = getDefaultSharedPreferences();
int value = sharedPref.getInt("count",0);

And if it is not posssible, how is possible from an application to store variable so that other application have access to it?

Bazouk55555
  • 557
  • 6
  • 24

1 Answers1

0

Yes it is possible, but both apps need to be signed by the same certificates among other things, check this answer for details.

An application can also share and access data from a public content provider and this is usually the recommended way of sharing data among different applications.

You can also have a shared file in storage that both apps can read and write.