Shachar Shemesh wrote: > I think I understand why the confusion. I believe you are talking about > statically linking, while I'm talking about dynamically linking.
I am talking about what is possible at the SDK level, which is presumably what you want, since you are on the beginners' list. > 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. That is a noble goal. Unfortunately, it flies in the face of Android's security architecture, the implementation of Java, and the implementation of Dalvik. > 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. Yes, it will. Each APK needs to be signed and sealed. There is no way in userland that I am aware of to achieve dynamic linking with shared RAM. There may be a way to achieve this via putting your JAR in a modified firmware, as Dalvik does copy-on-write for firmware code, though I am unclear whether that is just for the runtime or if it includes other JARs as well. But, really, your goal should be to keep your library small, and allow apps to statically link with it. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

