How to send data from one application to other application in android?
As far as I could understand from your answer you're looking for intents:
On the manifest of App A - Activity Alpha you declare a intent filter with Category DEFAULT and Action = com.your_app_package_name.your_app_name.ActivtiyAlpha
The on App B, Activity Beta you put the code to launch A and pass the data:
Intent i = new Intent("com.your_app_package_name.your_app_name.ActivtiyAlpha");
i.putExtra("KEY_DATA_EXTRA_FROM_ACTV_B", myString);
// add extras to any other data you want to send to b
Then back on App A - Activity Alpha you put the code:
Bundle b = getIntent().getExtras();
if(b!=null){
String myString = b.getString("KEY_DATA_EXTRA_FROM_ACTV_B");
// and any other data that the other app sent
}
If you're concerned with only a small amount of data, Android provides a SharedPreferences class to share preferences between applications. Most notably, you can add OnSharedPreferenceChangeListener to each application so they can be notified when the other changes the value.
Most importantly, you can't ensure that both applications are running
You can find more information on http://developer.android.com/guide/topics/data/data-storage.html