Android Question Inter App Communication

biometrics

Active Member
Licensed User
Longtime User
I have two apps (one is an activity and the other a service) and I want to communicate between the two. How do I do that?

Is there a way to send and receive messages between them directly without using an intermediary like a file or database and a timer?
 

werner_Fourie

Member
Licensed User
Longtime User
There are several ways. The best way depends on your requirements. You can open a socket on one app and then connect to this socket in the other app.

Another option is to send intents between the applications (probably simpler).
Hi All..

Is there an example for what Erel is mentioning in the above.. " You can open a socket on one app and then connect to this socket in the other app"
Really would appreciate it..
Thanks
 
Upvote 0
Top