My suggestion (the one I have used) is to persist the data using either shared preferences or something of that nature. Then have your service read that data during oncreate. You could also have a way to pump a message to the service to reload the data once it is running or if you want to force it reload the data.
AIDL's are your friend for pumping stuff back and forth between your service and your application. It is kind of like lightweight RMI. It is good for sending calls and pumping callbacks to and from your activity to your service. On Aug 1, 4:29 pm, Rajesh Bachani <rajesh.bach...@gmail.com> wrote: > Hello friends! > > I am trying to explore how information can be exchanged between > activities and services. > So, if we have Activity A and a Service S is started from A, using the > startService() method - is there a way to pass parameters to the > Service - and also receive values from the Service into the Activity > once the stopService() method is called? > > I am using Intent to start the service, as one would expect. > > And further what is the advantage of calling the onBind method, as > opposed to the onStart(). > > Thanks, > Rajesh. -- 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