I think a local service would work fine. Basically create another class in your android project, extend Service, do your stuff, then send a broadcast from your service. In your activity you will want to register a broadcast receiver that listens for that broadcast from the service. In the onReceive event of the Broadcast Receiver execute whatever code you need to once the service responds. You can set the service up to send different broadcasts for different actions.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Isaac Wagner Sent: Tuesday, November 30, 2010 1:01 PM To: [email protected] Subject: [android-developers] Question about services I've been reading Mark Murphy's books about Android programming and I am having trouble understanding some things about services. As I understand it there are "local" and "remote" services that I can create. However, what I don't understand are the use cases for when you would use one over the other. Here's basically what I need to do and I'm not sure about which service type to use. I want to create an application and a homescreen widget that both get data from a service. I had in mind a service where the application and the widget could register a callback with the service to get data updates. Is that best done by a remote or a local service, or does it matter? Can either one be used? Any hints or tips would be great. Oh, if it matters the app, widget, and service will be in a single apk. Thanks. -- 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 -- 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

