2

I have two apps first app store the login token in SharedPreferences and i access it in second app by SharedPreferences. The scenario is now change. If the user is using second app and not login through first app, i want to show login screen in second app. I want to know is it possible to write login token on SharedPreferences of first app through second app?

robot
  • 71
  • 2
  • 7

1 Answers1

0

It is data Sharing using on Intent class and add this method putExtra sent the data for simple way.

  Intent intent = new Intent(/* YOUR Code */);
  intent.putExtra(); // data sent here (key & value) string or something your requirement
  startActivity(intent);
Najib.Nj
  • 3,706
  • 1
  • 25
  • 39