On Mon, Jun 4, 2012 at 11:30 AM, Greenhand <cooperateonl...@gmail.com> wrote:
> If I use startService(), can the Activity communicate with the Service
> and vice versa?

startService() uses a variation of the command pattern: you
"communicate" with the service via extras on the Intent passed to
startService() as the command. The service can then use a Messenger,
or broadcasts, or local broadcasts, or a PendingIntent, etc. to
trigger UI updates based upon work that was completed.

You are welcome to use both binding and startService(), if you wish,
in which case the latter is simply to give the user more direct
control over the start/stop of the service itself, with the binding
for other communication.

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

Android Training in DC: http://marakana.com/training/android/

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

Reply via email to