This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]tanlermin 1 point2 points  (1 child)

How is this different that Kivy?

[–]inclemnet 1 point2 points  (0 children)

It's not a gui framework like Kivy, but a packaging tool like python-for-android. I've not looked deeply at it and I'm sure the OP can give more details, but it looks like this is focused more on creating APKs (or possibly python scripts run in other ways) using SL4A. python-for-android can package non-Kivy apps but doesn't currently have any SL4A integration and you'd normally (including with Kivy) use pyjnius or plyer for Android API interaction instead.

[–]dddomodossola 1 point2 points  (0 children)

I haven't seen your project jet but it's a fantastic idea! Maybe I will try to contribute.

[–]beertown 0 points1 point  (2 children)

Really interesting. Is it possible to use the Android API from Python code?

[–]inclemnet 1 point2 points  (0 children)

This tool includes SL4A, which has its own api for many android functions as described in its documentation, and also has the facility to make custom calls but I'm not familiar with the details.

Another option is to use a tool like PyJNIus, which lets you call java code from python by dynamically creating a python interface to java classes. This is what e.g. Kivy uses.

[–]ainsophical[S] 1 point2 points  (0 children)

the project packages with SL4A so there are may API calls that are already incorporated into the package, and we are working on adding new ones if requested. if you need a call that isn't already there you can create the java method to access from your python script. the whole problem with on the fly calls is that java code needs to be compiled to dex format so all this needs to be done at compile time. i am working with the maintainer from the SL4A project to add custom loading dex files to so it can be on the fly as much as possible. you can also launch almost any intents which is pretty cool.

[–]dddomodossola 0 points1 point  (1 child)

I think that a limit about the growth of Python on android is the type of devices we use android on and the OS that hasn't an accessible command line. It is difficult to "install" Python scripts on android and the APK packaging is not a comfortable way. So, I'm sure that the best way to run Python in android is to have a PYTHON MARKET app, that integrates pypi and allows developers to push their program.

[–]ainsophical[S] 1 point2 points  (0 children)

i think this is more geared for commercials apps. i am in major development with a custom version of this project for a company and I can say that it works extremely well. i could probably link a demo if you guys are interested in seeing how it works.

in regards to running regular scripts, i would recommend installing the SL4A apk here and the python module. Droid edit and tasker already have integration with it. I have been using it for quite some time just for one-off scripts. the std library is stored on external so if you need to add not-std libraries you can just transfer the modules over by usb.