3

Is it possible to use LuaJava in an android application?

The LuaJava project directory contains makefiles for Windows and Linux. It wouldn't be too difficult to create one for Android and compile using NDK, but I just want to know whether it is feasible or not.

EDIT I am using a Lua engine. I was wondering if I can call Java functions/create Java objects from Lua.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
SatheeshJM
  • 3,575
  • 8
  • 37
  • 60
  • 1
    Try this. http://stackoverflow.com/questions/2113432/how-can-i-embed-lua-in-java – Larry Battle May 24 '12 at 18:50
  • OK! I should have been clearer! I'm using a Lua engine and I want to know if I can call Java functions from the Lua side. Sorry for the lack of clarity. – SatheeshJM May 24 '12 at 18:57
  • Did you try jnlua, http://code.google.com/p/jnlua/? Or you have to use luaJava? – Larry Battle May 24 '12 at 20:09
  • Oh thanks! Somehow I missed that. And No. I do not HAVE TO use luajava. Anything will do! Thanks anyway! will see if that works. – SatheeshJM May 24 '12 at 20:55
  • jnlua does NOT work on Android out of the box, at least not without adding a lot of extra code; it relies on JavaBeans, which Android doesn't ship with. – SomeCallMeTim Dec 07 '12 at 20:11
  • 1
    @SomeCallMeTim: jnlua has now [been ported to Android](http://code.google.com/p/jnlua/wiki/PortingToAndroid) – Abbafei Dec 17 '13 at 06:35

1 Answers1

0

You can start with AndroLua: https://github.com/mkottman/AndroLua

From the homepage:

  • it includes LuaJava, so you can access (almost) everything the Android API provides
  • because writing code on the soft keyboard can be hard, you can connect to it using TCP an upload code from your computer