Python KivyMD Changing Interface after building app in smartphone - python

I want to compile my KivyMD application using buildozer. Before doing this, I run the application on the computer and see one interface. But after I collect it through buildozer, I see a completely different interface on my phone, and I don’t know what this is connected with. Please help, work is on fire...

Related

pydroid3 python program converted to android app with buildozer will not start on android How can I debug?

I created a kivy app in python using pydroid3 It is quite simple, a single button. It works on the android device when run from pydroid3.
I successfully converted the python app to an android app using bulldozer.
Primary Question
I cannot get any debug feedback from the android device as to why the application crashes at start-up.
Can someone help find the location of some sort of android logs similar to syslog or PHP log in Ubuntu.
Here is what I have done to solve this problem myself:
I found documentation on how to properly configure the conversion with buildozer.spec. Soon I realized that I was adding all the python modules involved in the program - but most documentation says that buildozer scans the original files and imports the necessary modules, but still after numerous failures, I added as many as I determined needed to be included.
Each time I start the app on the android 10 device (a radio head), it just crashes upon opening. No error messages etc. I find it unexpected that there is no way to view some kind of Syslog in android. But still, I continued.
I installed android desktop (AD) on my Mac laptop and then connected it to the android head unit and setup the unit to allow USB debugging. I was able to get AD to spew out endless lines of real-time data in the Logcat display.
I was not able to identify anything related to my app in the output provided by logcat: a search using the filter resulted in nothing associated with my app's name. Further, nothing shows up searching for "error" "failure, "failure to load," etc -- that might have given me a clue.
Next Question
Are there any documents related to how to create a program in python, using buildozer, and then install and debug the app in android?
I am sure this is one simple missing module or a similar issue that should be glaring in an error log somewhere.
Thanks for any help.
Jack
.
see the information above

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

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.
Just download pydroid3 from play store and follow the steps to create an android app.
Install kivymd module using pip in pydroid3.
Watch kivymd tutorials on youtube to learn kivymd module , you can also refer to kivymd documentation on google.
Develop application using kivymd module in pydroid3.
Convert your python file to apk using kivy buildozer in google colab in chrome on your mobile phone.
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.

How to run an android device application by inputting values from outside application using python

I am working on a module where I need to automate an application in an Android Device using Python. But here is a challenge that I am facing is that the application has visualization part which is a Machine movement. To move the machine, I need to give the inputs from another external application which has fields like North,East,Elevation etc. These values are taken from that external application and Machine gets moved in the android device.
My thoughts are like to use module
import subprocess
Can some one suggest me if my idea is correct or any other procedures to ahead....I got struck.
Till now no coding has been done and I need to project to convince the team first. We shouldn't use any APIs of the external application.

Use a UI phone as the default interface for kivy in python

I was watching some videos of Flutter, and it was impressive that Flutter has a Phone and you can see the phone with the app like this:
Also in kivy we make apps but when we run it we have the default interface like this one:
The thing is that I would like to change the image of the default display interface, or the figure of the ui to an iphone, is there a way to do it?
Flutter doesn't have a phone as you say. That is an iPhone simulator or an Android emulator. You can get an emulator by installing android studio (Android SDK to be precise ) and a simulator by installing Xcode. After the installation, you can then compile your kivy app into a package and run it on the android emulator or simulator.
Follow this documentation to see how to compile for Android.

How to embed a Python interpreter in an Android App

I'd like to execute python code from an Android app. I wish to implement a text editor in my app where the user can load, edit and run his script. I will create specific functions for the user to code some functionality into the app. For now, I've identified Python as the most friendly language for my purpose.
What methods are there for creating an embedded python interpreter in an android app? I've been looking at Kivy framework, and was maybe hoping that I could use the python command exec(codeString) to run the code. But Kivy is packaged by Buildozer tool to produce an *.apk for android, which might be compiled and not interpreted. Would this work?
There are several apps out there that allow python coding in an Android device, so technically it is possible.

Categories