I developed an android app and it sends broadcast with a custom permission.
public abstract void sendBroadcast (Intent intent, String receiverPermission)
Now any 3rd party app that has a broadcast receiver and declared the custom permission in their manifest will be able to listen to the broadcast.
Is there a way to control which application can receive the broadcast from my application?
what I'm afraid of is the custom permission gets in the hand of the wrong people and they start creating their own app to listen to my broadcasts.
FYI, the protection-level is set to dangerous.
Thanks,
You can set the receiving package name of the 3rd party app in your intent as follow:
intent.setPackage({3rd pary app package name});
context.sendBroadcast(intent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With