|
|
|
|
|
by freakboy3742
3375 days ago
|
|
The primary difficulty is that JNI is really limited on Android. It exists, but it's really slow, and there are some hard limits imposed at the kernel level. An alternative approach is VOC (http://pybee.org/voc) - this is compiler that takes Python code, and output Java bytecode. This means you can use the Android native UI components, because your Python code becomes indistinguishable from code written in Java. Combine with Briefcase (http://pybee.org/briefcase), and you can get an Android app with one command; combine with Toga (http://pybee.org/toga), and you can get a cross platform app using native system components. If you want to see this in action, here's a video: https://www.youtube.com/watch?v=RisCgSIWwLA (Full disclosure - I'm the primary author of these tools) |
|
Without it, my feeling is that you lose the benefits of Python's dynamic nature and still suffer the drawbacks - the compiled code is ten times slower than CPython, according to the FAQ. Given those tradeoffs I'd prefer Kotlin, even though Python is my favourite language.