- Developing an Android app with Python as a backend is absolutely possible. There are primarily two methods to make this into a reality. They are
- Write Python code and convert it into a android apk
Write python code as modules and call the python modules from Java or Kotlin
First option can be done by a package builder like buildozer or Python for android. This will also pack the python interpreter in the app itself since the android does not have a python interpretrer.
Second option used a plugin called Chaquopy which will let us call the python modules from java via the plugin
First option does not require the Android Studio and you need android studio if you take the second route.
We have tried the first route and we were able to generate the android apk from pure python code. The app and the source code and the detailed tutorial on converting the python code code to an working android app can be found here. One more interesting fact is the gui of this python is also governed by the python through frameworks Kivy and KivyMD. The gui also looks like it is developed with native tools. Bess thing is all these tools are free and open source.
Example android apps that uses python as a backend
- Electron Cash wallet for BCH
- Chaquopy: Python for Android
- Chaquopy Matplotlib
- Tic Tac Toe developed using Beeware framework
- Drawing App developed using Beeware framework
- FlaskWithAndroid developed using python flask framework
- Android ToDo App where python is used as backend
- Instagram Clone
- Math Games : Brain Sharpener
- 2048 Py