onBind only gets called once when the service is started, subsequent
bindServices reuse the same IBinder

This isnt particularly well documented, but confirmed after numerous
attempts to debug and
http://groups.google.com/group/android-developers/browse_thread/thread/d887a04a0b46c721/475755b074aa8a4e?show_docid=475755b074aa8a4e

On Jan 27, 7:49 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> Use two different AIDL files and two different binders returned by
> onBind(). Use something in the Intent (e.g., custom action) to
> distinguish which one to return for a given bind request.
>
>
>
> On Wed, Jan 26, 2011 at 12:39 AM, Dale Harvey <d...@arandomurl.com> wrote:
> > I have an application that provides a remoteService that is defined
> > through an .aidl generated interface, this all works great, completely
> > seperate applications just need to bundle the .aidl and they can
> > control the service in a specific way
>
> > However I want the sevice to provide an extra API when it is bound to
> > the application that it ships with, which is an administrative
> > interface.
>
> > The administrative interface still needs to perform the usual
> > bidirectional communication that remoteService lets me use but with
> > additional calls in the api that arent provided to other packages
>
> > Since the service and activity that starts it are in the same package
> > I have tried various setups of singletons and static interfaces to no
> > avail (there is state involved so a pure static interface isnt enough)
> > however none of these have worked, I can get round it with various
> > nasty ways through Application variables / talk through the filesystem
> > however I was wondering if it was possible in a cleaner way.
>
> > Thanks
> > Dale Harvey
>
> > --
> > 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
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://bit.ly/smand1andhttp://bit.ly/smand2

-- 
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

Reply via email to