Python Forum
Integrating Python Script for Android App - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Integrating Python Script for Android App (/thread-15389.html)



Integrating Python Script for Android App - everythingisenergy - Jan-15-2019

Hello all,

I am trying to integrate a python script into an Android App. I have found there are many ways to go about this. I started with, and am still trying to go with google's Flutter app dev kit. I am using Android Studio v 3.3. I have found a python plugin that will allow me to launch an interactive command line console, and if I put the py script in that folder it will find it and run it. Working with that plugin (called Chaqopy) presents its own challenges and also is in straight Java. I have a good GUI going in flutter and I am thinking of just converting the python script to Java or C++ code to re-use it directly in Android Studio.
The python script uses libraries such as socket. Would I have to convert the library as well?

Does anyone have any idea off the top of their head which would be the best way for me to go? If I can launch it in the Java/Plugin project, maybe I should just start there, does that sound easiest?

Thanks