kivy

How to detect screen rotation on Android in Kivy?

♀尐吖头ヾ 提交于 2021-02-20 17:54:26
问题 I have been searching for a Kivy solution to capture the Android device rotation from one orientation to another. I have tried both of the window methods below but neither executes the on_rotate or rotate_screen routines when I rotate the device. I see there is an onConfigurationChanged event in java but I can't find the same event handling for Kivy. Window.on_rotate(self.on_rotate) Window.bind(on_rotate=self.rotate_screen) What I do get in the logcat is the following messages indicating the

How to detect screen rotation on Android in Kivy?

ぃ、小莉子 提交于 2021-02-20 17:53:23
问题 I have been searching for a Kivy solution to capture the Android device rotation from one orientation to another. I have tried both of the window methods below but neither executes the on_rotate or rotate_screen routines when I rotate the device. I see there is an onConfigurationChanged event in java but I can't find the same event handling for Kivy. Window.on_rotate(self.on_rotate) Window.bind(on_rotate=self.rotate_screen) What I do get in the logcat is the following messages indicating the

How to edit SQLite database values using kivy and RecycleView

大兔子大兔子 提交于 2021-02-19 08:44:09
问题 I'm trying to display an sqlite3 database in python using kivy. Tested out ikolim's solution here and it works as intended in displaying the database contents into the RecycleView's button labels: And when a button is pressed, a popup and edit function appears as intended: And it does edit the selected button's text as shown in the next screenshot.. : ..but not the sqlite database values. Would it be possible to reflect the changes the user makes inside the Kivy app to the values inside the

Path to files in kivy app not valid after building with buildozer

房东的猫 提交于 2021-02-19 08:11:15
问题 I'm trying to build a kivy app using the buildozer virtual machine. It works fine as long as my main.py doesn't contain any specific paths to files. For example, in my app I want to display an image. If I run on Windows, I would specifiy the source as C:\pathtoapp\img\image.png In Ubuntu it would be /home/pathtoapp/img/image.png If I try to build the app with buildozer I get the error message: I/Python (15649): [Error ] [Image ] Error reading file and then the above path. Here is an example

How can I catch kivy-client crash log and send it to my server?

ぃ、小莉子 提交于 2021-02-19 06:40:36
问题 I have problems when some hardware issues appears and my kivy app crashes. For example on Android or iOS. Regular users can't see the log, neither can I. So, when my application starts, I want to create separate process and somehow look at the status of main application. In case of it's crash I'd like to send error log to my server. So, what is the best way to do this? Maybe another process is redundant and I can make it in more simple way? And how exactly I can catch crash log?...Thanks! 回答1

accessing gpio from within kivy android app

落爺英雄遲暮 提交于 2021-02-19 05:58:26
问题 OK I am stumped and its possible I have just not had enough experience with android, so I dont know which permissions to use. I have recompiled the android kernel to expose the gpio pins I need, maybe I need to do something in the kernel to solve my problem... basically at this point i have no idea I can open adb shell and go /sys/class/gpio/export 141 and get the gpio folder and its files (value,direction,etc). and when I am in the adb shell I can set the direction and values using echo out

kivy using addtional class to store data from multiple screens

佐手、 提交于 2021-02-19 05:27:40
问题 I want to add an additional class to my kivy app that is just an info storage depot. I'm not sure where to do this or if this approach is even advised. The app has multiple screens. Each screen allows the user to make a selection. The user's selection is what I want to store in the additional class. The additional class will store data then ultimately use MQTT to send the data out. Also, I wanted to keep the class definition in a separate file so I could organize the program into logically

Accessing android flashlight(camera LED flash) with kivy/python

时光毁灭记忆、已成空白 提交于 2021-02-18 18:19:08
问题 I can't figure out how to access the led light on my android with python or kivy, I have tried installing python-for-android to be able to import the android module into my code but it's not the module can't be found. I cloned python-for-android as instructed here. I didn't install the ndk or sdk as per that page as I thought since kivy already uses them they were already installed. Can someone please point me in the right direction? 回答1: Yes, you can write this app in Kivy from the desktop,

Accessing android flashlight(camera LED flash) with kivy/python

会有一股神秘感。 提交于 2021-02-18 18:17:13
问题 I can't figure out how to access the led light on my android with python or kivy, I have tried installing python-for-android to be able to import the android module into my code but it's not the module can't be found. I cloned python-for-android as instructed here. I didn't install the ndk or sdk as per that page as I thought since kivy already uses them they were already installed. Can someone please point me in the right direction? 回答1: Yes, you can write this app in Kivy from the desktop,

How to update progressbar using Clock Object with Multithreading in kivy-python?

冷暖自知 提交于 2021-02-18 17:48:07
问题 I am making an app in kivy for that i am using linux. i am getting a problem to update the progress bar gui using clock object with multithreading in python-kivy. i am using both files .kv & .py file run the app. my main.py file: from kivy.app import App from kivy.uix.label import Label from kivy.uix.boxlayout import BoxLayout from kivy.uix.progressbar import ProgressBar from kivy.uix.button import Button from kivy.uix.popup import Popup from kivy.clock import Clock import sys, threading, os,