This is not optimal, but this is what i did.

Implement your service, aidl and related java classes in one of your
apps (either the free or the paid one) in your Android project. Make
sure that your service is up to snuff at some point and all runs well.
Be sure to put the aid and all related java classes under one package
name (or sub-packages). This makes it easier to move later.

Create a regular Java project. Use the android.sdk (instead of JDK1.5)
in the library path.
Physically move the package (and sub-packages) of your service code,
your aidl and your related java class, AND the java class generated
from your aidl, from your Android project to this new Java project.

Remove this package (and sub-packages) of your service code from your
Android project (including the java file generated by the aidl under
the 'gen' folder) if they are still there.

In your Android projects, both your paid and free version, link to the
newly created regular Java project that contains the code for your
service.

It works well for me.
However, if i need to make a change in the aidl, it won't re-generated
its java file, since it's no longer part of an Android project. That's
a downside.

In your Android projects subclass the class from your regular Java
project that is the Service. E.g. 'com.me.myapp.free.SomeService
extends MyService' and 'com.me.myapp.paid.SomeService extends
MyService', where 'MyService' is now defined in your regular Java
project. And put the SomeService in your Manifest.

On Feb 26, 12:39 pm, Moto <[email protected]> wrote:
> I would like to make my life easier by having one common code base for
> my service for both paid and free apps.  I want to eliminate the
> complex merging I find my self doing every time I need to release!
>
> As of now I had to change the service file name along with the Remote
> service aidl calls.
>
> Please any advice would be helpful!
>
> -Moto!

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

Reply via email to