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

前端 未结 3 2049
野趣味
野趣味 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:34

    I think you should have the BroadcastReceiver start your activity again with the result in the Intent.

    Or you could use AIDL about AIDL. The samples also have an (multiple?) example how to use AIDL and services. But AIDL might be to much of a hassle for your purpose.

提交回复
热议问题