How do we specify in broadcast sending application that which application can receive this broadcast, and in receiving application that which particular application has the
If you want to restrict who only can send intents to your broadcast receiver, do it this way:
The broadcast receiver:
...
The broadcast sender:
...
Sending broadcast from the sender Activity to the receiver:
Intent intent = new Intent();
intent.setAction("my.app.Action");
activity.sendBroadcast(intent);
If you declare the permission like this:
Then the sender will be able to use this permission and send broadcasts to receiver only when both the sender and the receiver apps are signed by the same developer certificate.