> * In short:
> Is it possible to reuse classes and resources from A.apk in B.apk?

Classes, no. Resources, sorta, but I'm not sure it's a good idea, since
you have no way of ensuring that each device has both A and B (versus
having only A or only B).

> and it looks like there are only 3 options:
> 1) Highly complicated custom build file. It should get classes and
> resources from both projects and package them together.
> 2) Make a third project which consists of symbolic links to classes
> and resources of those two projects.
> 3) Make project A as a service and consume it in project B.
> They all are imperfect:
> - 1 and 2 would pack classes and resources of project A into the .apk
> of project B.
> - 3 has performance penalty and reuse is not so easy.

4) Package the reusable classes in a separate JAR file and include those
JARs in other projects. All of the cwac-* projects on my github page use
this pattern:

http://github.com/commonsguy

However, resources don't work for this pattern.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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