0

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.

  • 1
    well first I suggest You getting at least a keyboard and a mice and connect those to the phone. next You will need to get python environment on Your phone, one way to do that would be using SoloLearn (which is downloadable in Play Store, in the app there is a sanbox), however it will be extremely difficult to do anything on the phone. also just in case PyCharm is an IDE and Kivy is a python library. oh and I don't know if SoloLearn has Kivy library – Matiiss Mar 31 '21 at 07:24
  • 1
    I'd try termux. Termux is a Linux environment on mobile, so you can do basically anything you can do on a CLI-Only Linux system – Maritn Ge Mar 31 '21 at 07:47
  • I have to disagree with the previous comments. Through a lot of trouble, you may be able to write working python code on your phone. However, good luck compiling this. To build an android .apk you must use python-for-android, or, better yet, buildozer. Both of which need a linux environment to run. – NameKhan72 Mar 31 '21 at 09:15
  • @NameKhan72 Would Termux not provide the necessary Linux environment to build the APK with the required resources installed? – NihonDash Mar 31 '21 at 12:44
  • I honestly do not know. Maybe. I have my doubts, because I'm not sure, whether this emulator can handle compiling 1000s of files. I guess, that OP should just try it. Would really be awesome it did work. – NameKhan72 Mar 31 '21 at 15:44

2 Answers2

1

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

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.

Eoin Brennan
  • 131
  • 7