2024-04-23 –, B05-B06
Since many years Android has held the top position as the most used OS with about 38% of the OS user share in 2023. Currently 3 major languages – C++, Java, Kotlin are used for application development on Android. Although Python has the capabilities of enabling Android deployment, Python was never considered as an adequate language for Android development. But, with the introduction of “PEP 738: Adding Android as a supported platform”, and the increasing popularity of frameworks like PySide6, Kivy, Flet etc. which enable GUI development with Python for Android devices, it is time for Python package developers to consider Android as a potential platform.
This talk gives an introduction to each of the GUI development toolkits – Kivy, Flet and PySide6 by demonstrating how to create a simple Contact List application. We later delve into the pros and cons of each of these frameworks, so that Python application developers can decide which framework suits their requirements better.
Python can be used to create native applications for Android. However, although Python is the most popular programming language, it is not the first choice to create an Android application. This talk gives an overview of developing Android application with Python by comparing the 3 popular frameworks for GUI development with Python that support Android as a platform – PySide6, Kivy and Flet. This comparison is demonstrated with a simple Contact List application with the ability to add, edit and delete contacts.
The overall structure of the talk will be almost the following:
- Why is Android a relevant platform for Python application developers? (6 minutes)
In this section, we establish why Android is the most popular OS being sued currently. Although Python has had the support to run applications natively in Android, even dating back to 2011, the development of Android applications with Python is not so popular. We will further highlight one of the major concerns of using Python for Android develpoment and how PEP 738 can help simplify this.
- Current status of Android app development with Python (2 minutes)
In this section, we give a brief introduction to some of the Python based toolkits that support Android as a platform – Kivy, Flet, PySide6, Beeware etc.
- Contact List application with Kivy (3 minutes)
In this section, we look at how the applicatiion looks with Kivy and KivyMD, followed by the ease of development and some pros and cons of the framework.
- Contact List application with PySide6 (5 minutes)
The deployment of PySide6 application to Android uses the same build tool as Kivy, called python-for-android. python-for-android now also supports a Qt backend along with SDL2 that Kivy uses thus enabling the deployment of PySide6 application. In this section, we look at how the applicatiion looks with PySide6, followed by the ease of development and some pros and cons of the framework.
- Contact List application with Flet (3 minutes)
In this section, we look at how the applicatiion looks with Flet, followed by the ease of development and some pros and cons of the framework.
- Python packages support (6 minutes)
We see the various Python packages supported by each framework.
- Conclusion and Questions (5 minutes)
Questions from the audience.
Intermediate
Expected audience expertise: Domain:Intermediate
Abstract as a tweet (X) or toot (Mastodon):Current state of deploying Python applications to Android with a comparison of the current available frameworks.
Public link to supporting material, e.g. videos, Github, etc.:Shyamnath aka Shyam is a Senior Software Engineer respoinsble for developing PySide and shiboken6 at the Qt Company. Having worked across many domains including Mainframes, Java, Android and Machine Learning, Shyam's current interest lies in playing around with C++ and Python.