[android-developers] Re: Accessing local data in a bound service

2011-07-13 Thread Ab Caballero
Thank, Mark! I chose the latter as the name of method as it seemed appropriate. /Ab On Jul 13, 1:54 pm, Mark Murphy wrote: > On Wed, Jul 13, 2011 at 4:36 PM, Ab Caballero wrote: > > My onServiceConnected() code looks like this: > > > public void onServiceConnected(ComponentName className, IBin

Re: [android-developers] Re: Accessing local data in a bound service

2011-07-13 Thread Mark Murphy
On Wed, Jul 13, 2011 at 4:36 PM, Ab Caballero wrote: > My onServiceConnected() code looks like this: > > public void onServiceConnected(ComponentName className, IBinder > service) { > >  Log.i("INFO", "Service bound "); >    mBoundService = ((MainService.LocalBinder)service).getService(); > > } >

[android-developers] Re: Accessing local data in a bound service

2011-07-13 Thread Ab Caballero
Thanks, Mark. My onServiceConnected() code looks like this: public void onServiceConnected(ComponentName className, IBinder service) { Log.i("INFO", "Service bound "); mBoundService = ((MainService.LocalBinder)service).getService(); } I'm assuming that the binder is mBoundService, which i

Re: [android-developers] Re: Accessing local data in a bound service

2011-07-12 Thread Mark Murphy
On Tue, Jul 12, 2011 at 7:54 PM, Ab Caballero 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. onBi

[android-developers] Re: Accessing local data in a bound service

2011-07-12 Thread Ab Caballero
Thanks, Mark. Let me rewind because i tried something like that and didn't get very far. What i would really like is for my service to access data from my activity. But since i couldn't get that to work i thought i could do the reverse and just deal with the fact that i was going to have two files