I have made a app for which licence expires after 2 years. And I am making another app which I want to use for renewal of the licence of the first app. I will provide user with
You can communicate between apps using BroadcastReceivers. Check the documentation here:
http://developer.android.com/reference/android/content/BroadcastReceiver.html
In the sending app:
public void broadcastIntent(View view)
{
Intent intent = new Intent();
intent.setAction("SOME_ACTION");
intent.putExtras("key",key);
sendBroadcast(intent);
}
In the receiving app:
public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Intent Detected.", Toast.LENGTH_LONG).show();
String key=intent.getStringExtra("key");
// do something with the key
}
}
In the manifest file of the receiving app, under tag: