javaandroidpythonsl4a

Android: Call Python Script (via SL4A) from Java code


Is it possible to call/run a python script file from Java code on the Android platform using SL4A? Basically I have a full blown Java Android app and I have several Python scripts that scrape some information from various web pages. I would like to be able to call these python scripts with the web page and get the results back. Is this possible? If so, can anyone point me in the direction of an example or two?

Thank you, Harry


Solution

  • Here you go, a solution on how to make Android applications using SL4A and Python. I have developed a functional Python application following this tutorial so I can vouch for it. I assume you can add the Python code and do your data exchange with JSON.

    I personally have never tried to mix these two together, though I will probably try after seeing your post.

    Also, if you have any problems/questions, related to starting that example, post them here, I might help.