Scriptable Apk < FRESH >

Lua via LuaJIT. It’s tiny (~200KB), fast, and easy to sandbox. Step 2: Set Up the Android Project Create a normal Android project in Android Studio. Add the interpreter as a dependency.

dependencies implementation "com.badlogicgames.gdx:gdx-platform:1.12.0:natives-armeabi-v7a" implementation "org.luaj:luaj-jse:3.0.1" // Lua interpreter scriptable apk

Expose Android APIs to the script engine. This is the critical part – you must define a Java object that the script can call. Lua via LuaJIT

A scriptable APK is an Android application package that embeds a scripting engine (such as Lua, Python, JavaScript, or even BASIC) and allows users—or the app itself—to modify, extend, or automate the app’s behavior without recompiling the entire APK. This concept merges the portability of native Android apps with the flexibility of scripts. Add the interpreter as a dependency

Now in your Lua script (loaded from assets or /sdcard/script.lua ):

public int add(int a, int b) return a + b;

public class ScriptAPI private Context context; public ScriptAPI(Context ctx) context = ctx;

Ready to Transform Your Product Visualization Workflow?

Join hundreds of product designers using the best physically-based GPU rendering solution.

View Pricing Plans