I have a local service that will need to wait for a response and when it gets the response immediately update the activity with that information. So the activity will not poll a service method but the moment the local service gets some data it has to inform that activity immediately somehow.
So Activity--binds-->LocalService <------>(RemoteService separate process). So I know I could just package it up in an intent and pass it up to the activity ... but is that the best/only option. How else might one communicate up the stack from the local service to the activity thats invoking the local service? Keep in mind I already have the local service binding to a 开发者_开发技巧remote separate process service which runs forever in the background and periodically sends realtime data to the local service. Thanks
you can pass the handler
object of the activity to service thru setter()
and using this object you can update the change in the activity.
精彩评论