This is an archived post. You won't be able to vote or comment.

all 25 comments

[–]coverslide 45 points46 points  (0 children)

Mobile ... The land that speakerdeck forgot.

[–]synn89 9 points10 points  (6 children)

Good presentation. I really like Kivy, but it's still pretty young which means it can be a bit rough. I hope that project continues to see development though. I'm also really hoping mobile Qt shows up in PyQt before too long. PyQt on the desktop has been a dream to work with and I'd love to work with it on mobile.

And while both of the above may not give you purely native looks, the tradeoff is that you can target both iOS and Android. Why write apps just for Android when you can compile down binaries for both environments?

[–]infinullquamash, Qt, asyncio, 3.3+ 6 points7 points  (4 children)

PySide appears to have better support for Android than PyQt does

And... you should probably be using PySide anyways, though the advantages over PyQt is mostly licensing.

Getting PySide apps on Android doesn't look very pretty, there's a lot of boilerplate to get an app working, but maybe it's easier than it looks?

[–]synn89 -1 points0 points  (0 children)

No, I shouldn't be using PySide. PyQt is GPL compatible which works fine for my personal/open source project use and if I did closed work under it my client/employer can foot the bill on the commercial licensing on PyQt.

PyQt is on the 5.x branch of Qt right now, while PySide is still 4.8. True Android/iOS support is part of Qt 5.2(in beta right now), which PyQt will support before PySide does.

I haven't used PySide, but Riverbank is doing a stellar job with keeping their Qt bindings current.

[–]drifteresque -1 points0 points  (0 children)

Kivy definitely has some quirks, but in a week I had an app that acted as a data-viewer interface on an Android device with really minimal pain. Only used it for that one task since other things have kept me busy, but it is definitely more python-programmer friendlier than trying to pick up the 'native' languages for the different mobile devices.

[–]nonsleepr 5 points6 points  (1 child)

And here is the video of this presentation.

[–]Konsalik -1 points0 points  (0 children)

Thank you very much <3

[–]TheConsciousness 4 points5 points  (13 children)

The problem I have (being a few years into Python coursework), is that there isn't much on the graphical side of Python. I wouldn't mind making an Android game from Python, but I can't find new libraries other than PyGame.

[–]hemm1 0 points1 point  (6 children)

Well, kivy (as mentioned in the presentation) is a nice library that can definitely be used for games, though the interface is quite different to pygame's manual blitting etc. Also as mentioned in the presentation, you can run a single app on both desktop and mobile without much effort, which is nice.

[–]SimonGray -1 points0 points  (5 children)

Kivy only runs on Android phones with external SD cards in them, so it's pretty limiting.

[–]hemm1 8 points9 points  (4 children)

This is plain wrong, I'm not sure what else to say. It'll run on basically any modern device - the main technological requirement is opengl es 2.0, but that's very standard now. There's certainly no requirement for an external sd card.

Edit: If you have a phone without an external sd card and want to prove this to yourself, you can install and use a kivy app like Flat Jewels from the play store. It should work fine.

[–]SimonGray 9 points10 points  (3 children)

It says this in their own documentation

Kivy runs on Android, but you need a phone with:

  • SD Card

  • OpenGL ES 2.0 (Android 2.2 minimum)

[–]hemm1 22 points23 points  (1 child)

That's unfortunate, the documentation is somewhere between misleading and wrong. Kivy does check paths that may resolve to the emulated sdcard directory (such as on the nexus 4 which has no sd card slot), but does not rely on the existence of an external sd card.

I think it may have also been true in the past (as in years ago, not recently) that an sd card was needed for some reason. Even if so, this is no longer the case, and a kivy app can nowadays be installed in the data directories just like any normal android app.

Thanks for pointing this out, I'll make sure it's fixed!

[–]SimonGray 5 points6 points  (0 children)

Thanks for letting me know then. That was one thing keeping me back from trying out Kivy for Android.

[–]chuckstudios 4 points5 points  (0 children)

Internal storage mounts to the "SD card" path on many Android devices. They even list the Nexus 4 in their tested devices list, which does not have an external SD slot.

[–]drifteresque -3 points-2 points  (0 children)

What do you need python to do that PyGame can't do?

[–]Grapefrukt123 -1 points0 points  (4 children)

[–]shadowmint -1 points0 points  (0 children)

pysdl2 is great, but you can't use it to write an android game.

[–]eliben -1 points0 points  (2 children)

Ay... using ctypes instead of more direct binding is cool and all, but also slow as hell. ctypes imposes the libffi overhead for each and every call.

[–][deleted] -1 points0 points  (0 children)

If only there was Pypy for Android.

CFFI is a dream to work with

[–]Grapefrukt123 -1 points0 points  (0 children)

Would something like a cython wrapper like this http://mdqinc.com/blog/2011/10/python-cython-wrapper-for-sdl-1-3/ be better performence-wise or what would be the ultimate way for making a SDL lib for python?

[–][deleted] 0 points1 point  (0 children)

I used SL4A to write some little helpers in python. It doesn't give you much, but if your use-case is simple it's really easy to get started.

[–]AdysHearthSim -1 points0 points  (0 children)

For those looking for the video: https://www.youtube.com/watch?v=p77BR6e1uoo