How to establish a two-way communication between Activity and Service in different process?

前端 未结 3 2034
野趣味
野趣味 2020-12-14 13:02

I\'m working on establishing a two-way communication between an Activity and a Service which runs in a different process.

Querying the process from the Activity is n

3条回答
  •  暖寄归人
    2020-12-14 13:25

    You have to use BroadcastReceiver to receive intents, and when you want to communicate simply make an Intent with appropriate values.

    This way you should be able to make a 2-way communication between any component.

提交回复
热议问题