Samuell Gretkins
Samuell Gretkins

Reputation: 197

Execute python script from my java android app

I have an app in mind that will run various python scrpits. But I have a problem running python scripts from my java code.

I tried to use QPython, but I will have to start new intent to run my python code. That's not a problem but I have to close QPython intent manually to receive console output back to my app. That's not go.

Also I looked at sl4a and its fork android scripting but I didn't find any examples of how can I do such a thing from my JAVA code. Thanks.

Upvotes: 4

Views: 8786

Answers (2)

Serge Karp
Serge Karp

Reputation: 11

Try https://chaquo.com/chaquopy/

It does exactly what you need but their licensing process is very unfriendly. I have the same issue and I'm still unable to find another solution, although because of the licensing, I'm not going to use it.

As an idea I'm thinking of making a service completely in python using kivy and all the rest in java, but I can't yet find an example.

Upvotes: 1

River
River

Reputation: 206

There is a sampleproject which shows how to execute python scripts on your android devices.

https://github.com/qpython-android/AndroidApp-with-qpython-API

Upvotes: 0

Related Questions