I'm new to android development, and I have had some experience with Java, C#, Python, etc. Python being my favourite, I'd like to code Android app with it.
Then I saw this question:
Is there a way to run Python on Android?
The most voted answers mentioned Kivy
and ASE
(which is now SL4A
and includes PY4A
).
However, after some googling, I wasn't able to find any useful info about the difference between Kivy
and PY4A
. Searching for difference between Kivy
and SL4A
was fruitless, too.
So, as for Kivy
and PY4A
,
can someone explain, in easy terms:
- What are the similarity and difference between them?
- What are their good and bad parts?
- Are there any other good alternatives?
Confusingly, there are two projects called 'python for android'.
SL4A lets you run python scripts on android. Their PY4A is a step in their toolchain, but I don't know much about it. I understand there is some integration with android apis (you can use some hardware etc.), but limitations in how to run the programs (they aren't full apps, no gui etc.). This is stuff I infer from seeing other posts, I haven't tried it, don't take my word on the details. (Edit: actually it seems there is some ability to package apks and multiple ways to create a gui, I don't know the details)
Kivy is a graphical framework that supports many operating systems (linux, windows, osx, android, ios, maybe more already). You use it to build python guis. The kivy project also started their own python-for-android project which provides ways to compile the python interpreter for android and to package it as an actual android app (including java api integration with pyjnius etc.). Kivy is well integrated with it so that you can easily compile a python gui app for android, though I don't think this python-for-android is limited to kivy apps.
So, they are completely different projects that happen to have a component with the same name. SL4A is for running python scripts on android, I don't know much about its limitations or details. Kivy is a python graphical framework (not limited to android) that can be compiled via its own different python-for-android project to fully integrated gui android apps.
You can see (for instance) kivy showcase for examples of some simple kivy capabilities, or flat jewels for an example of a simple game made in kivy. These are just examples, a lot more is possible.