"This example is ONLY for people working with the open source platform to create a system image that will be delivered on a device which will include a custom library as shown here. It can not be used to create a third party shared library, which is not currently supported in Android."
This has caught my interest this evening after I came back Ironman II and googled for a bit. I haven't tried any of this yet, but I'll give it a whirl tomorrow after work.The following may work for messing around. It would not be a comprehensive solution however for general app development and distribution for android with scala.1. I think you can add a pure jar, such as the scala-library.jar, by first starting the emulator and then sending over the prepared jar file and the xml permissions file via an adb push. However you would have to do this every time the emulator was fired up, but not too bad.2. However, it may be that the jar and xml file may need to be present at startup. So the trick would be to get it into the system.img. The following link discuz-android.blogspot.com/2008/01/customize-google-android-systemimg-for.html shows how to create a new system image, from a running emulator image. Sounds like it goes something like this:a) Start up a vanilla emulator image.b) adb push the xml, scala lib jar and the mkfs.yaffs2 utility into the running image.c) Use adb shell to log into the emulator image and create a _new_ system.img inside the emulator of the emulator's /system tree.d) adb pull the newly created system.img that now has the scala lib in it back on to your pc.At this point the idea would be to try to swap out the system.img in the base emulator with this new image. When you restart it you now have an emulator with a linkable scala-library in it. Another idea is to clone the add-on tree in the SDK and tweak the xml files ... to create a new add-on which is "scala ready" for android development.One still faces the problem running the app on a "real" phone/tablet. If the above works I don't see why one could not do it on a "rooted" android. Not sure, yet, on a non-rooted. If /system/framework isn't writable to non-root for example it would be trouble.Ray
--
The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane. - Marcus Aurelius
On Mon, May 10, 2010 at 4:59 PM, Kevin Wright
<kev.lee...@googlemail.com> wrote:
> Just for running on the emulator you mean?
> It's definitely an interesting idea, and shouldn't even be too hard to sort
> out a variant of scala library without the reflective bits that android
> can't deal with. I'm putting this one on my "to be investigated" list for
> when 2.8 final comes out.
As an aside: What are those 'reflective bits that android can't deal
with'? I never came across those as long as I didn't try to generate
code (obviously).
And yes, I think for debugging purposes using a shared library would
in fact be interesting.
--
Johannes
-----------------------------------------------
Johannes Rudolph
http://virtual-void.net