Thanks for your reply.
I found another Lua interpreter - LuaJ - which is pure Java and seems
to be complete. I will try to integrate it the way you advise.
Also I am considering an option of using JNI in my project and then I
could just static link the traditional C's Lua implementation (very
little dependencies and should work much faster). The problem could be
portability in the future (when Androids with other processor types
come out) and: JNI looks ugly.
Anyway, it looks like I'm heading for Lua support - the lang I love.

Thanks,
dev.dri

On 30 Gru, 22:06, Mark Murphy <[email protected]> wrote:
> dev.dri wrote:
> > Hello,
> > I am searching for some method of extending Android application with
> > scripting support. All I need is something simillar to Lua's C api - I
> > should be able to bind a few functions (classes not necessary) and run
> > a script with a parameter to do some actions and produce result.
> > Android api bindings are unnecessary (even unwanted for security
> > reasons).
>
> > I have searched this group and google for a lib like this, but no
> > success. Sure there is Android Scripting Environment, but it runs Lua
> > and Python normal interpreter as a separate C process. The Java port
> > of Lua interpreter, which I could possibly compile for Android,
> > doesn't seem to be ready yet, but I may be wrong. I have also looked
> > at JRuby, which looks good except it is large and it may be hard to
> > limit script's access to Java classes, or to set it up properly.
> > Also, Android seems to have some Javascript interpreter (with Webkit)
> > - maybe there is a way to use it inside app?
>
> > So here is my question: How can I add scripting to my app?
>
> Step #1: Find a scripting engine that doesn't do fancy JIT bytecode
> generation.
>
> Step #2: Integrate it no different than you would with any other Java
> environment.
>
> For example, I've used Beanshell successfully. The JARs on their site
> are old, so you have to recompile them with a newer Java compiler, but
> otherwise things work great:
>
> http://github.com/commonsguy/cw-android/tree/master/Java/AndShell/
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 1.3 Available!

-- 
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

Reply via email to