I have a free and a premium version of the same app (almost same code, same classes with "if"s here and there, different packages in the manifest, same process name in the manifest). The main activity calls a service to execute some stuff, using an IMPLICIT intent.
When I install both apps on the phone, it turns out that the premium activity actually starts a "free" service sometimes and a "premium" service another. I have been playing around with categories and the packagemanager but it seems too complicated.
Questions :
I guess you could add an extra boolean isPremium to the intent. Naturally you will need some more of those "if's".
Activity:
//send broadcast
Intent serviceStarted = new Intent(Actions.ACTION_START_SERVICE);
serviceStarted.putExtra(Extras.EXTRA_PREMIUM_VERSION, PREMIUM_VERSION);
sendBroadcast(serviceStarted);
Receiver:
if (!intent.getExtras().getBoolean(Extras.EXTRA_PREMIUM_VERSION)) {
Log.v(TAG, " - ignoring wrong version");
return;
}