How to write android applications in python on an android device?

168 views Asked by At

I am currently learning Python as part of my job and was interested in the possibility of creating android applications using what I am learning. Unfortunately I only have access to a computed at work and the system is pretty locked down in that I cannot export work I create etc and the only device I have during my leisure time is my android phone.

I have heard about the possibility of using Kivy but have only seen reference to this being used on MacOS, Linux or Windows making me think my only choice would be running a virtual machine which would be less convenient than running a native tool. I have also seen that AIDE is a great tool for android app development on mobile but can only be used with C++/Java which would involve learning additional languages and PyDroid3 being a great python tool but don't know how this could be used to create android apps.

Any experience or knowledge in this area would be much appreciated. I understand the best scenario would be to either buy a laptop/pc and use PyCharm and/or Kivy or to learn Java and used the official Android development suite but in my current situation this is not possible.

2

There are 2 answers

0
Manjinder Singh On

Just download pydroid3 from play store and follow the steps to create an android app.

  1. Install kivymd module using pip in pydroid3.
  2. Watch kivymd tutorials on youtube to learn kivymd module , you can also refer to kivymd documentation on google.
  3. Develop application using kivymd module in pydroid3.
  4. Convert your python file to apk using kivy buildozer in google colab in chrome on your mobile phone.
0
Eoin Brennan On

I haven't used kivymd but I have used kivy in pyroid3 and it works really well on a phone. Also when you run the code it gives a really good indication of how the final app will look on the phone. But that said I have only used Buildozer to compile the .APK and this only works in Linux so for me that ment virtual Linux system.