Mark Murphy wrote: > Shachar Shemesh wrote: > >> I actually came across the "PlatformLibrary" sample and readme, as well >> as a lot of googling while waiting for the moderator to approve my first >> email to the list. I came up with "you need to place the JAR with a >> classes.dex in /system/framework and /etc/permissions" solution, which >> pretty much requires you to compile inside the android source tree. Now >> you are telling me I need to compile it completely outside the source >> tree. Like I said - confused. >> > > That is for modifying the firmware. If you are looking to create a > reusable component for Android SDK applications, that is not what you want. > > >> Once the JAR is created, how do I link an application with it? >> > > For building from Ant, you drop the JAR in the libs/ directory of the > project. > > For building from Eclipse, you drop the JAR in the libs/ directory of > the project, then do whatever it is you normally do in Eclipse to tell > it about another JAR to link to. > > >> How do I >> make sure it has access to the code during run time? >> > > Android's build process handles this. > > >> A regular JAR has >> .class files, which need translation before they can run on Dalvik. >> > > Android's build process handles this. > > I think I understand why the confusion. I believe you are talking about statically linking, while I'm talking about dynamically linking.
My library might grow quite big and will be used by several programs (distinct programs), and I do not want it to load multiple times. Your solution would link the library into the APK, which means that if I use it in two programs, it will be loaded into memory twice. Shachar -- Shachar Shemesh Lingnu Open Source Consulting Ltd. http://www.lingnu.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

