How to use Broadcast Receiver in different Applications in Android?

  1. Your <receiver> element needs to be a peer of your <activity> element, not a child.
  2. Your action string should NOT be in the android.intent.action namespace, unless you work for Google — use ch.ifi.csg.games4blue.games.pacman.controller.BROADCAST or something like that instead
  3. Your <intent-filter> with your custom action needs to be placed on the <receiver>, not the sending or receiving <activity>

See here for an example of implementing a manifest-registered broadcast receiver (for a system-broadcast Intent).

Leave a Comment