I am trying to get a standard Android application to execute a python script that can return Java values, but I have a lot of problems.
Jython doesn't support this on Android, SL4A is a dead project, Kivi seems to be a complete stack structure that doesn't use Java at all, and QPython is SL4A that runs on Android 5+, but almost no documentation.
I wanted something like:
// From INSIDE my Java Code new PythonEngine().execute('a = 1 + 1').getInt('a')
With QPython, I found an example that executes arbitrary code, but I could not figure out how to get the result and how to run the script without opening a new activity waiting for the user to return.
Is it possible? An example can be found here. QPython Java Sample
source share