Live data from Hacker News

Python on Android

kivy.org

41–50 of 51 posts

Re: Python on Android

#41
post #7

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…

Awesome start!

Re: Python on Android

#42

I also did give a try after I saw a post here on HN about a new release. I wasn't very happy with it. There were many bugs that's a complete mess to get started with. I tried the example on their documentation and got it running on my Linux box (which was very easy), but kept failing on Android due some missing dependency. These issues are not listed on their website, giving the impression it will just work out of th…

You shouldn't in principle need to worry about the difference between the sdl2 and pygame/sdl backends on Android, since kivy's own API is the same in either case.

You don't need to install pil either (kivy preferentially uses other providers), unless directly using it in your own code, in which case you can include it in the android build by adding it to the python-for-android modules string or buildozer requirements line (just 'pil', this is the name of an internal recipe). If you have a window and text provider problem on android, that indicates that something is wrong with the android build, and we can help to debug if you provide the logs. I'm not sure offhand what problem would allow the android build to complete but give this error, but it would probably be revealed in the log.

Re: Python on Android

#43
post #38
post #26

Earlier quoted context omitted.

I teach intro CS to non-majors, and having to explain terminology is cumbersome. For instance, we call things "strings", "floats", and "dictionaries". And then I make them download Anaconda so they can get Spyder to write Python programs. I can't help but wonder what goes through their heads.

Isn't "map" the proper CS term rather than a dictionary?

They're called dictionaries (dicts) in Python.

Re: Python on Android

#44
post #38

Earlier quoted context omitted.

Isn't "map" the proper CS term rather than a dictionary?

They're called dictionaries (dicts) in Python.

And in .NET, but that's sort of an alias, while the scientific term is "map", I believe.

Re: Python on Android

#45
post #7

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…

So it's conceptually similar to React Native, but Python instead of JS(X)?

Yes. 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.

Re: Python on Android

#48

I also did give a try after I saw a post here on HN about a new release. I wasn't very happy with it. There were many bugs that's a complete mess to get started with. I tried the example on their documentation and got it running on my Linux box (which was very easy), but kept failing on Android due some missing dependency. These issues are not listed on their website, giving the impression it will just work out of th…

You shouldn't in principle need to worry about the difference between the sdl2 and pygame/sdl backends on Android, since kivy's own API is the same in either case. You don't need to install pil either (kivy preferentially uses other providers), unless directly using it in your own code, in which case you can include it in the android build by adding it to the python-for-android modules string or buildozer requirement…

This is more or less the same issue

https://github.com/kivy/kivy/issues/3234

I have since removed everything I setup, but I'll try to setup as I did before and give a complete log.

Re: Python on Android

#49

Earlier quoted context omitted.

You shouldn't in principle need to worry about the difference between the sdl2 and pygame/sdl backends on Android, since kivy's own API is the same in either case. You don't need to install pil either (kivy preferentially uses other providers), unless directly using it in your own code, in which case you can include it in the android build by adding it to the python-for-android modules string or buildozer requirement…

This is more or less the same issue https://github.com/kivy/kivy/issues/3234 I have since removed everything I setup, but I'll try to setup as I did before and give a complete log.

Ah, thanks. I suspect this is a bug related to the transition to sdl2, though I'm not sure what makes it present (it doesn't happen to everyone's android build).

If you're interested, one thing to try is (if you're using buildozer) to put 'kivy==master' in the requirements line instead of just 'kivy'. This will download the master branch, which may have a fix for this.

It not that, it's probably an issue somewhere in the python-for-android/buildozer build process, so that log would be the most interesting. If you're able to provide it that would be great, but thanks either way for reporting it.

Re: Python on Android

#50
post #40
post #20

Earlier quoted context omitted.

Too bad google suffers from a NIH syndrome.

As evidenced by using Java in the first place, and considering C# for Android at one time ("If Sun doesn’t want to work with us, we have two options: 1) Abandon our work and adopt MSFT CLR VM and C# language, or 2) Do Java anyway and defend our decision, perhaps making enemies along the way")? Or choosing Groovy-based Gradle as the main build system for Android? Or not integrating Dart VM into Chrome? Unlike Microsof…

> Or choosing Groovy-based Gradle as the main build system for Android

If that decision was made by more than just some obscure team buried deep within Google's hierarchy, then why didn't Google start sponsoring the Groovy manager and 2 developers when their funding was axed by Pivotal 2 months ago?

Post reply on HN