3 ms·
So, I've actually been working for the past while on a project to allow building more native apps on Android using Python. It is built on the Kivy tools, but I
by Macha 12y ago
So, I've actually been working for the past while on a project to allow building more native apps on Android using Python. It is built on the Kivy tools, but I have had to make some changes to python-for-android specifically because it's not as seperated from Kivy as the developers think. I've also had to make a small change to PyJNIus, as it has a dependency on SDL when on Android.
The reason I chose to work on this is while you can already create an application using Kivy, it sort of exists in its own world compared to standard Android apps. Because you don't have separate activities, you can't really do stuff like have one of them be launched to handle a specific file or URL (disclaimer: what I'm building can't either yet). There's also the same issues you get with mobile apps that are web apps in an APK, where someone has attempted to reimplement native UI widgets and there's certain behaviours that are not quite right or missing, or you can't use them yet because they haven't been replicated in your environment yet.
So basically what I'm doing is the Python equivalent of Xamarin.Android (https://developer.xamarin.com/guides/Android/ https://developer.xamarin.com/guides/Android/ ) built on some of the Kivy tools. The idea is that you'd have the bulk of your logic in cross platform Python and a thin UI layer for any platforms you had. And in the future if someone made a similar thing for iOS, you could build a layer overlying the two of them and get actually native behaviour on both.
Overall I've gotten it to the stage where you can create activities, access some standard UI elements and launch third-party apps via Python code, but like I said, it's still at a pretty early stage.
I'd intended to open source it when it got to a more usable state, as it's pretty much in proof of concept state atm. (bugs ahoy, tests and docs are very lacking, feature coverage is low, setup is a PITA, and the API is too close to the Java API to make for nice Python). These are problems I believe are fixable. If you want to see the current state of it though, it's on https://bitbucket.org/tonyfinn/pydroid https://bitbucket.org/tonyfinn/pydroid , but it's a bit off how far I'd like to be before sharing it.
- inclemnet 12y agoThis looks really cool, thanks for sharing it. I've seen this kind of idea talked about many times, but never any implementation, and even if at an early stage there's clearly a lot of effort in your basic structure and api (edit: and docs!).
- andybak 12y agoGood god, here's a Kickstarter I'd get behind.
- gedrap 12y agoYes, grandparent, please consider this :)
- bsimpson 12y agoSo it's conceptually similar to React Native, but Python instead of JS(X)?
- Macha 12y agoYes. There's no JSX analogue for templating, it just uses the android XML layouts so designers can use existing tools, but otherwise it's a pretty similar approach.
- txprog 12y agoAwesome start!