Hi, Yes they can.
http://developer.android.com/guide/developing/tools/aidl.html Note: Using AIDL is necessary only if you allow clients from different applications to access your service for IPC and want to handle multithreading in your service. If you do not need to perform concurrent IPC across different applications, you should create your interface by implementing a Binder or, if you want to perform IPC, but do not need to handle multithreading, implement your interface using a Messenger. Regardless, be sure that you understand Bound Services before implementing an AIDL. Regards On Jun 30, 11:55 pm, Suraj Gopalakrishnan <[email protected]> wrote: > @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, Jun 30, 2011 at 7:20 PM, Suraj Gopalakrishnan > <[email protected]>wrote: > > > > > > > > > > > 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 <[email protected]>wrote: > > >> On Thu, Jun 30, 2011 at 8:47 AM, Suraj Gopalakrishnan > >> <[email protected]> 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 mean that onBind() is not getting called a second time, which > >> I find mildly curious. It is possible that the service is caching > >> based upon Intents -- if you use an equivalent Intent for binding each > >> time, it reuses a cached Binder. Or, perhaps there is something wrong > >> with your logging. > > >> -- > >> 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.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 > > > -- > > Best Regards, > > Suraj Gopalakrishnan > > -- > Best Regards, > Suraj Gopalakrishnan -- 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

