I agree Mark.  But here, I have no means to alter the service and
cannot do as you suggest.

The only alternatives that occur to me are:

1.  I write a separate service  (deployed in a separate package...
installed separately?  yuck) that wraps one of the two underlying
services to offer my app two separate interfaces
2.  offer a second version of my product for the higher mark SDK
levels with the dissimilar service interface

Are there other options that occur to you?

tone

On Jan 10, 8:05 am, Mark Murphy <mmur...@commonsware.com> wrote:
> DulcetTone wrote:
> > How is an app supposed to be able to use an underlying service whose
> > name does not change, but whose AIDL file has changed from one Android
> > version to another?
>
> IMHO, ideally the service uses a different intent filter per version of
> AIDL it supports, and you bind to the service with the appropriate Intent.
>
> For example:
>
> <service android:name=".BshService">
>         <intent-filter>
>                 <action 
> android:name="com.commonsware.android.advservice.IScript" />
>         </intent-filter>
>         <intent-filter>
>                 <action 
> android:name="com.commonsware.android.advservice.IScript2" />
>         </intent-filter>
> </service>
>
> where in onBind(), BshService would inspect the incoming Intent, look at
> the action, and return an appropriate binder.
>
> Of course, each binder will need separate AIDL, defining a separate
> interface, as you noted.
>
> This way, the service supports both old and new clients, and old clients
> can be ignorant of the existence of the new interface.
>
-- 
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