Quoting myself:
In addition, what happens if there are two (or more) services installed on the device that claim to support the same
<intent-filter>
, but have different package names? You might think that this would fail on install, as happens with providers with duplicate authorities. Alas, it does not. Instead, once again, the first one in “wins”.So, if we have
BadService
andGoodService
, both responding to the same<intent-filter>
, and a client app tries to communicate toGoodService
via the explicit Intent matching that<intent-filter>
, it might actually be communicating withBadService
, simply becauseBadService
was installed first. The user is oblivious to this.
Moral of this story: don't use implicit Intents
with services.