Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Suraj Gopalakrishnan
@Mark Thanks On Thu, Jun 30, 2011 at 7:43 PM, Mark Murphy wrote: > On Thu, Jun 30, 2011 at 10:11 AM, Kostya Vasilyev > wrote: > > Don't know the answer to that question, but that's easy to test. > > Yeah, I'll try it out over the next couple of days. > > -- > Mark Murphy (a Commons Guy) > http:

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 10:11 AM, Kostya Vasilyev wrote: > Don't know the answer to that question, but that's easy to test. Yeah, I'll try it out over the next couple of days. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Kostya Vasilyev
Given that you see onServiceConnected getting called twice, once for each bindService, and that onBind getting called again is just once normal, I'd say you have your answer: yes, 2 apps can bind to the same service. -- Kostya 30.06.2011 17:55, Suraj Gopalakrishnan ?: @Kostya I did defi

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Kostya Vasilyev
Don't know the answer to that question, but that's easy to test. -- Kostya 30.06.2011 17:58, Mark Murphy пишет: On Thu, Jun 30, 2011 at 9:49 AM, Kostya Vasilyev wrote: > The binder object returned by onBind is reused, and so it's only called > once. Even if the Intents are different (e.g.,

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 9:49 AM, Kostya Vasilyev wrote: > The binder object returned by onBind is reused, and so it's only called > once. Even if the Intents are different (e.g., different action strings)? If so, that would invalidate some advice that I have been providing to people, specifically

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Suraj Gopalakrishnan
@Kostya I did define my own interface with AIDL. But i did not use the binder object returned by the OnBind() method (as it was not necessary), since i did not want to use any methods from the remote service. I just want to know whether 2 apps can be bound to a single remote service On Thu, Ju

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Suraj Gopalakrishnan
1.When i first called bindService from App A, it showed logs from OnCreate, OnBind and OnServiceConnected 2.Then i called bindService from App B, it just displayed the logs from OnServiceConnected() Does this mean both are connected?? On Thu, Jun 30, 2011 at 6:30 PM, Mark Murphy wrote: > On

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Kostya Vasilyev
The binder object returned by onBind is reused, and so it's only called once. If you need more rich service / app interaction, well, define your own interfaces with AIDL -- Kostya 30.06.2011 16:35, Suraj Gopalakrishnan пишет: When App-A bound to the remote service, it hit 1. OnCreate()

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 8:47 AM, Suraj Gopalakrishnan wrote: > Yes onServiceConnected() is called from App-B. That means that you are bound. > So this concludes that two applications cannot bind to the same remote > service, doesn't it? onServiceConnected() means your service is bound. It does

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Suraj Gopalakrishnan
Yes onServiceConnected() is called from App-B. So this concludes that two applications cannot bind to the same remote service, doesn't it? On Thu, Jun 30, 2011 at 6:13 PM, Mark Murphy wrote: > On Thu, Jun 30, 2011 at 8:35 AM, Suraj Gopalakrishnan > wrote: > > When App-A bound to the remote serv

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 8:35 AM, Suraj Gopalakrishnan wrote: > When App-A bound to the remote service, it hit > 1. OnCreate() > 2.OnBind() >  methods > When App-B tried to connect to the remote service, there were no hits. onCreate() would not be called, as the service is already created if App A

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Suraj Gopalakrishnan
When App-A bound to the remote service, it hit 1. OnCreate() 2.OnBind() methods When App-B tried to connect to the remote service, there were no hits. On Thu, Jun 30, 2011 at 6:02 PM, Mark Murphy wrote: > On Thu, Jun 30, 2011 at 8:25 AM, Suraj Gopalakrishnan > wrote: > > But i tried to bind to

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 8:25 AM, Suraj Gopalakrishnan wrote: > But i tried to bind to a remote service from App A and when i tried to bind > to the same remote service from App B it didn't bind? > What might be the reason? I have no idea. Of course, I also am unclear of what you mean by "didn't b

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Suraj Gopalakrishnan
But i tried to bind to a remote service from App A and when i tried to bind to the same remote service from App B it didn't bind? What might be the reason? On Thu, Jun 30, 2011 at 5:49 PM, Mark Murphy wrote: > On Thu, Jun 30, 2011 at 7:58 AM, Suraj Gopalakrishnan > wrote: > > Can more than one a

Re: [android-developers] Binding to a Remote service

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 7:58 AM, Suraj Gopalakrishnan wrote: > Can more than one applications bind to a remote service simultaneously? Yes, AFAIK. Remote services, particularly ones involving binding, are not terribly common, though. -- Mark Murphy (a Commons Guy) http://commonsware.com | http: