On Thu, Nov 11, 2010 at 7:30 AM, xi developer <[email protected]> wrote:
> I am new in Android . I encounter the following situation,
>
> I have a background running service, which will get a keep-updating
> string from a webpage, I need to show this keep-updating string in my
> UI through Activity, since this string is get from service, I am
> wondering, How can the service pass the string to Activity so that
> activity can render the string on UI. Anyone can help?

Use a callback/listener object that the activity supplies to the
service via an API exposed by the service and accessed via
bindService().

Or, use android.os.Messenger.

Or, use a broadcast Intent.

Or, use a ResultReceiver.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to