3 ms·
Check the MainActivity.java file [1]. It shows how you can extract the necessary python files, send a JSON message and get the response back from the embedded P
by jventura 10y ago
Check the MainActivity.java file [1]. It shows how you can extract the necessary python files, send a JSON message and get the response back from the embedded Python interpreter. The readme file [2] talks a little bit on what is going on and which files you need if you want to use Python in your own existing projects.
The all project is a bare-bones Android project that you can import on Android Studio and run on a real Android device. I've added instructions on the readme file on how to build and run it, and I have an app in the Play Store that uses this "technique"..
[1] https://github.com/joaoventura/pybridge/blob/master/app/src/main/java/com/jventura/pyapp/MainActivity.java https://github.com/joaoventura/pybridge/blob/master/app/src/...
[2] https://github.com/joaoventura/pybridge#how-it-works https://github.com/joaoventura/pybridge#how-it-works