[Android] android and Lua
Maria Gheorghe
reclamamulta at gmail.com
Wed Oct 8 16:11:25 CEST 2014
android runs lua perfectly.
why we dnt use it in vlc if there is support?
i do not know how vlc must use in teh propper way the lua scripts ,but long
time ago i played with lua in some of my projects and go very good results.
so why to dnt put it in vlc if is so easy to implemet?
Whnat i needed to do wqs only to add a.so file in armv abi and to send
command to it and load it.( like we need to do with libvlc in android
player)
Please take a look of this page and see how simpel is to run lua scripts
from java.
http://dotnetslackers.com/articles/mobile/Integrate-Lua-into-Your-Android-Games.aspx
you just need to put the .so in libs and add java clases to the big project
then you can do teh sample:
package
com.javaluaexamples;
import android.app.Activity;
import org.keplerproject.luajava.*;
public class startActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LuaState L = LuaStateFactory.newLuaState();
L.openLibs();
L.LdoString("text = 'Hello Android, I am Lua.'");
L.getGlobal("text");
String text = L.toString(-1);
TextView tv = new TextView(this);
tv.setText(text);
setContentView(tv);
}
}
Is not a need to compile now the libluajava.so you can use existing.
If I can use luain a simpel project ,why vlc can not use it?
maybe you 'll add suport
have a great day all!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20141008/256792f2/attachment.html>
More information about the Android
mailing list