开发者

Sending Messages from my Service to my Activity?

I have an Android Service which copies files to an ftp server.

While it is doing that, I want to send feedback to my Activity so the user knows what happens.

I tried implementing it using the RemoteMessengerServiceSample code, but I have a problem ... All messages I send during the ftp transfer 开发者_运维技巧arrive at my Activity the moment the copy operation is finished ... not message by message while the copy job runs as I would like.

Is there any way to fix this? Maybe i'm using the wrong method for sending messages to my activity?


Try issuing a Broadcast it's much more simpler than implementing the service<-->activity binding.

This will help you for the activity side how can I notify a running activity from a broadcast receiver?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜