4 ms·
It looks like a 'Hello World' will result in about a 10 Mib APK which takes up roughly double that space when unpacked on the mobile device. This is not surpris
by Zuider 10y ago
It looks like a 'Hello World' will result in about a 10 Mib APK which takes up roughly double that space when unpacked on the mobile device. This is not surprising because the APK must contain the Kivy library and a Python interpreter. After that initial hurdle it will scale relatively well, though that can depend on which extensions and other files you include.
- Humphrey 10y agoI'm assuming that 10MB would be less if you didn't want to use Kivy. However, I assume that using Django would probably take even more space that Kivy. So could it get big fast?
- Zuider 10y agoPython for Android is an extension for Kivy, so it is not optional. It looks like apps could get quite big since adding functionality involves including Python libraries to be called from Python rather than interacting with the Android API.
- inclemnet 10y agoKivy actually is completely optional, python-for-android doesn't require any particular frontend. The main supported options for guis other than Kivy are SDL2 (you can use e.g. PySDL2) or a webview, but it's designed to be easy to add more options.
- tyingq 10y agoThat's not too bad. I see plenty of apps installed on my phone that are 2 to 6x that size, and a few even larger. Appreciate the info.
- deleted 10y ago[deleted]
- freakboy3742 10y agoIf you want a smaller target, VOC (http://pybee.org/voc http://pybee.org/voc) can generate a "Hello World" APK in about 1.6MB. VOC 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 http://pybee.org/briefcase), and you can get an Android app with one command; combine with Toga (http://pybee.org/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 https://www.youtube.com/watch?v=RisCgSIWwLA (Full disclosure - I'm the primary author of these tools)