On Tue, Jul 12, 2011 at 7:54 PM, Ab Caballero <[email protected]> wrote: > What i wanted to do then was pass data to the service (one parameter) > by using putExtra() but i couldn't figure out how to get it to work. > Is it possible to use putExtra() while binding to a running service?
To a running service, no. onBind() is only called once per distinct Intent, and you do not want to bind multiple times from the same activity, anyway. However, bear in mind that the primary -- perhaps complete -- reason you are binding is to get a Binder. You can supply TRIP_INFO via a method call on the Binder in onServiceConnected(). Passing data via extras is used when you are using startService() to send commands, rather than binding. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

