View Single Post
  #1 (permalink)  
Old October 8th, 2010, 10:48 PM
dan77062 dan77062 is offline
Registered User
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default binding service to an activity, simple example?

Is there a simple example of binding a service to an activity? The code snippets (Chapter 9 Listing 9-5 and 9-6) are really unclear. I can't even figure out which snippet goes in the service and which goes in the activity.

I have a broadcast receiver that starts a service and I'd like to bind to that service with an activity that allows the user to see some data from the service when they choose to have the activity in the foreground.

Sounds fairly simple, but I keep getting runtime errors and I need a simple example to get it straight.

Thanks!
Reply With Quote