1

Is there a way to include a Python interpreter in a kotlin app? I need to do some serial communication over WiFi and I thought a simple Android app will be good for this

Comments
  • 0
    If for scripting purposes (no dependencies + some limitations), then check starlark from bazel, it’s python dialect implemented in java. But as I understood you want to use python dependencies to implement something? In that case, should be possible with compiling api to c.
  • 1
    There is Jython - still stuck at Python 2.7, but generally working. It can be used in both directions (e.g. Jython to Java and Java to Jython) - however it requires additional work, as it is intended for (desktop) JDK.
    You might want to look at https://github.com/alsonkemp/..., but I haven't checked it.

    Alternatively you can develop the app directly in Python, by using Kivy. However, the interoperability with Java/Kotlin classes is a bit... difficult, but generally working.
Add Comment