Mark,

Thanks for the information.

Kevin

On Feb 14, 4:42 am, Mark Murphy <mmur...@commonsware.com> wrote:
> kevin wrote:
> > I am working on couple android applications whichsharea common
> >component. Thecomponenthas Activities, Service and own
> > AndroidManifest.xml. After research, it seems there is no concept of
> > run timesharelibrary among applications in Android. So I am looking
> > for a way to linked thesharecomponentwith other applications at
> > compile time.
>
> > Applications which will use thecomponentcan come from external,
> > therefore I will only provided the compiled file. I would like to
> > build thecomponentinto own apk or jar file, can external application
> > include my jar/apk file into their package and be able to start my
> > activity?
>
> JAR, yes. It is possible to build Android-aware JARs, containing only
> classes compiled against the Android SDK JAR. Those Android-aware JARs
> can define activities, services, etc. Those Android-aware JARs can, in
> turn, be put in the libs/ directory of an Android APK project and be
> compiled in.
>
> A couple of limits:
>
> -- You cannot define resources in Android-aware JARs, because resources
> are packaged in APKs, not JARs. To compensate, refactor your API to
> accept resource IDs as parameters, so the calling application can supply
> you with resource IDs to use.
>
> -- You cannot declare a manifest in Android-aware JARs, because the
> manifest is packaged in the APK. This means your calling application
> will need to declare any JAR-provided activities, services, etc. on your
> behalf.
>
> My book-in-progress _The Busy Coder's Guide to *Advanced* Android
> Development_ has a section on this technique.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Published!
--~--~---------~--~----~------------~-------~--~----~
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