Or use createPendingResult(). Or pass a Message (from Handler#obtainMessage()), if this is a local service.
On Wed, Oct 20, 2010 at 1:24 PM, Kostya Vasilyev <[email protected]> wrote: > If the service is driven by intents sent from the Activity (e.g. > IntentService), you could use this: > > http://developer.android.com/reference/android/os/ResultReceiver.html > > If the service is local (used only by your application), then you could have > a static in your activity that you set every time in onStart and clear in > onStop. The service could look up this static ("current instance") and call > back into the activity as data changes. > > -- Kostya > > 20.10.2010 21:15, Agus пишет: >> >> you send an intent from the service and have a broadcastreceiver in >> the activities >> >> On Wed, Oct 20, 2010 at 5:56 AM, saex<[email protected]> wrote: >>> >>> Hi >>> >>> I have an application that get/send data from/to a remote DB on >>> internet. >>> >>> I need to get my application working in background mode, then i supose >>> that i have to put all the send/get remote data in a service..... >>> >>> but.... How can this service change values of variables and UI >>> textfields of my activities? >>> >>> i can't find any information about this, all the tutorials i am >>> finding are of simple services that doesn't do something like that >>> >>> can someone explain me how to do it please? >>> >>> -- >>> 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 > > > -- > Kostya Vasilyev -- WiFi Manager + pretty widget -- > http://kmansoft.wordpress.com > > -- > 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 > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- 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

