Learning Android Development

Enable Lua Scripting On Android App

Enable remote scripting control over an Android App

Photo by William Bayreuther on Unsplash

Server-driven UI is getting more and more popular in App development, where we can have the Server define the layout we want to display. However, the engine (logic) of the UI construction is defined by the client.

However, how nice if we can send a Logic Script over the payload, and control the client better.

To do that, we’ll need to have the Logic Script interpreter. Manually writing that proprietary script would not be practical. We want to use some existing way of doing it.

Here, I found a way to run Lua script on an Android project, which makes remote control apps possible. 🤩

Example of the Lua script is below (Factorial function)

function fact (n)
if n == 0 then
return 1
else
return n * fact(n-1)
end
end

--

--