I am getting ready to start a little Android development and need to choose a language. I know Python but would have to learn Java. I'd like to know from those of you who are using Python on Android what the limitations are. Also, are there any benefits over Java?
相关问题
- Delete Messages from a Topic in Apache Kafka
- how to define constructor for Python's new Nam
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- streaming md5sum of contents of a large remote tar
I investigated this recently for similar reasons. My conclusions were that I could not use Python to develop a native-looking application, which is what I wanted at the time. Specifically:
Python can't receive callbacks from the Java UI classes, so you can't use any native Java UI elements such as ListView, etc. Only dialog boxes etc. are easily available. If you have a totally custom UI such as a game, you can try PyGame for Android, or you could look at Kivy, which also uses PyGame.
Packaging of Python applications is very difficult, especially because the Python interpreter is not included on Android by default. The Kivy and PyGame teams are making some intermittent progress on this.
Because of the aforementioned issues, Python is essentially never used to make full fledged applications published in the app store, and so the literature on how to handle the many sundry issues with SL4A (Scripting Layer For Android) is very thin.
So, if you want to make an application that uses native UI elements, that you can actually distribute in the Play Store, or both, Python is regrettably not an option.
I have developed Android Apps on the market, coded in Python. Downsides:
Most of the points mentioned by Andrew stand, I just wanted to mention that python can be and is used for full fledged Apps published on GooglePlay and even iOS. I can't speak for other frameworks but here are some examples of Apps published using Kivy.
On Packaging we have tried to make it as simple as possible, we also provide
On GUI, yes the ui is custom, by default(tries to match Android's Holo theme). However it can be customised to resemble other look and feels, although I haven't tried it personally.
Oh and as long as one is talking about python based apps on android, I found this project mentioned on stackoverflow PyMob, their apps page mentions some interesting apps .