swdeveloper
swdeveloper

Reputation: 918

In Android: Can I receive a Broadcast intent from one application into second application

I have an application Application1 which contains 2 java classes Sender (for sending a Broadcast intent) and Receiver (for receiving the Broadcast intent broadcasted by Sender).

So can I receive the intent broadcasted by Sender of Application1 in a Receiver class of an other application, let suppose Applications2? Is it possible to receive the intent broadcasted by one application into an other application?

Upvotes: 2

Views: 1928

Answers (1)

Tal Kanel
Tal Kanel

Reputation: 10785

the answer is - yes, you can. BroadcastReceiver is the right (and only trivial) way passing data between applications. no problem broadcasting intent from application1 and receive it with the appropriate intent filter in application2. furthermore - Google recommends doing so. one thing you need to know - your intent filter should be unique, and not easy to guess by malicious apps want to intercept some private user's data you don't want to share with them.

Upvotes: 2

Related Questions