I have two apps (appA and appB). I want to retrieve a single value stored in appA sharedPreferences
and use it in appB. Can I do that using intents?. I just need to do this once (on first install of appB).
Asked
Active
Viewed 40 times
0

Mike087
- 486
- 3
- 13
2 Answers
0
You should be able to do that adding .putextras()
to your intent and then getting them with getExtras()
on appB (after checking if they are present at all).
check this answer for reference https://stackoverflow.com/a/5265952/10637400

quealegriamasalegre
- 2,887
- 1
- 13
- 35
0
Use Intent to launch appB in appA
// Launch appB in appA
Intent intent = context.getPackageManager().getLaunchIntentForPackage(appB_PackageName);
intent.putExtra("key","value");
startActivity(intent);
Or read sharedPreferences in appB Android: Retrieving shared preferences of other application

Robin L
- 125
- 8