Wednesday, August 31, 2011

Re: [android-developers] Update UI from Service

On Wed, Aug 31, 2011 at 5:05 AM, Chirag Raval
<> wrote:
> Can any one help me to update UI from Service ?
> Here in my application i created one service, from my service i want
> to update a textview which is in my Main Activity ?
> How can i change that textview's value from my service ?

You send a message from the service to the activity, and the activity
updates the TextView. Whether you do this via binding and the listener
pattern, or ordered broadcasts
or a Messenger object passed as an Intent extra, or a PendingIntent
from createPendingResult(), or something else, is up to you and would
depend a bit on the service in question.

Mark Murphy (a Commons Guy) | |

Warescription: Three Android Books, Plus Updates, One Low Price!

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment