0

Is it possible to be able to pass a string value between two different applications?

First app:

final Bundle bundle = this.getIntent().getExtras();
final String a = bundle.getString("data");

Intent i = new Intent(Intent.ACTION_MAIN);
PackageManager manager = getPackageManager();
i = manager.getLaunchIntentForPackage("me.stuart.foodapp");
i.addCategory(Intent.CATEGORY_LAUNCHER);
Bundle extras = new Bundle();
extras.putString(a, a);
i.putExtras(extras);
startActivity(i);

Second app:

Bundle bundle = this.getIntent().getExtras();
String a = bundle.getString("data");
Blo
  • 11,903
  • 5
  • 45
  • 99

1 Answers1

1

You can send a broadcast with data from one application to another. Broadcasts are by their nature a cross-application facility

makovkastar
  • 5,000
  • 2
  • 30
  • 50