Can I do the same with Broadcast Receiver?
- app1: sendBroadcast(intent, permission)
- app2: define permission, use that permission.
To my understanding for using sendBroadcast(intent, permission), the application doesn't need to "use" the permission. Meaning ANY application can send intent to app2. Those permission parameters only checked against app2, to avoid other applications to receive this intent. (If I remove app2, and install fake app2 with the same permission string defined, fake app2 can get intent from app1, which is unexpected)
Is this true?
Now, I can set additional permission:
- app1: Define permission, use that permission.
- app2: Receiver restricted only for that permission.
Again, if one removes app1, installs fake app1 with the very same permission, then fake app1 can send fake intent to app2. What can I do to prevent app2 from receiving fake intent?