views:

40

answers:

0

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 :

  1. how does Android handle multiple components responding to a same Intent?
  2. how would you do what I am trying to do: I have the same service in multiple apps and I only want one instance being called from all the apps?