1

On page 550 of the commonsware 4.0 book, the Messenger is discussed and it is explained how the Activity can attach extra data when starting the service that allows the service to send messages back to activity anytime it wants.

It then explains how the service can send data back to the Activity anytime it wants.

I have this implemented and currently working in my app.

However I have a need for the activity to talk to the service on other occasions - many times during the life of the activity. What tool or conduit allows the service to send messages to the Activity any time it wants?

Thanks, Gary

4

1 回答 1

1

什么工具或管道允许服务随时向 Activity 发送消息?

由您自己承认:

然后它解释了服务如何随时将数据发送回活动。

因此,您的答案是Messenger。或该章中概述的任何其他技术。

于 2012-11-03T21:58:00.890 回答