Is it possible to call lua scripts from within java code for the android system? I discovered the Scripting Layer for Android and I have been playing with it on my device, but it would be really useful if I could call lua scripts from within my Eclipse projects. I know that this is possible if I developing on the NDK, but I have no desire to go that way (Java is just too nice). Thanks in advance.
Actually, you can easily port the Lua library to Android using the NDK. Take a look at my attempt - AndroLua that allows you to run scripts, write them using GUI or through the network, and capture output from print
function.
It even comes with LuaJava compiled, so you can work with Java objects in Lua, for example, the current running Activity
is available in Lua as the global activity
, and from that you can call for example activity:setTitle('Modified from Lua')
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With