arturh
arturh

Reputation: 6106

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?

Upvotes: 2

Views: 2995

Answers (1)

Pentium10
Pentium10

Reputation: 208042

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?

Upvotes: 1

Related Questions