4

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.

2
  • Hi, I am having a similar issue with QPython. Could you tell me if and how you could resolve this? Also, is there some sample code you could post? Commented Aug 20, 2015 at 14:28
  • I didn't found the solution and gave up on my little app, sorry. Commented Aug 21, 2015 at 5:12

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

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

1 Comment

Yeah, thanks you, but I already checked it out. It doesnt'do what I need it to do. It opens new activity, which I have to manually close, which is not acceptable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.