Hi, you can embed resources in JAR, we do it for a project. We embed PNG that are loaded by another JAR. But you cannot load layout using XML file whatever the XML location.
Regards On May 13, 6:23 pm, iliab <[email protected]> wrote: > I encountered similar problems in my work. I think it is a pretty > serious flaw in android development. I think the compiler shall be > able to incorporate resources within JAR files into APK. > > On May 13, 11:22 am,cg-dev<[email protected]> wrote: > > > > > > > > > Hi, > > > If I understand well your issue : > > > > What if I want to add some resources to the jar (e.g. a layout for > > > custom notification), is it possible ? > > > No as layout are XML files that are compress when building APK. > > And there is no API to load an raw XML layout. (except if it changes > > recently) > > > If you share a JAR, you need to share XML layout outside the JAR. > > Then the developper will integrate the layout into his project. > > > Regards. > > > On 12 mai, 11:08, Mark Cz <[email protected]> wrote: > > > > Hi, > > > > I have an external jar that external developers can use. The jar has > > > mainly one public static function that runs an android service > > > ( I asked the developers to add the service tag in the manifest), so > > > far so good. > > > > Now I am facing a problem that hope you guys can help me to deal with. > > > > What if I want to add some resources to the jar (e.g. a layout for > > > custom notification), is it possible ? > > > > I know the following options are valid, but none of them satisfy me > > > > 1. I can create an eclipse LIB project with code + resources, but > > > obviously i don't want to give the developers the entire code. > > > 2. I can create an apk but this requires the end user to install both > > > APK (mine and the one of the external developer). > > > > Thanks, > > > Mark -- 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

