doc:appunti:prog:kivy
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:prog:kivy [2019/03/01 12:00] – [APK Packager] niccolo | doc:appunti:prog:kivy [2023/10/07 19:53] (current) – [Logging] niccolo | ||
---|---|---|---|
Line 132: | Line 132: | ||
{{.: | {{.: | ||
- | ===== Run the Code with Android Kivy Launcher ===== | ||
- | ===== APK Packager | + | ===== Logging |
+ | |||
+ | Like a plain Python program, it is possible for a Kivy app to produce some logging using the Kivy logger. The output will go, by default, to a file created into the app home directory, into the **files/ | ||
+ | |||
+ | <code python> | ||
+ | from kivy.logger import Logger, LOG_LEVELS | ||
+ | # Set the loglevel. The Android log file will be create into | ||
+ | # [app_home]/ | ||
+ | Logger.setLevel(LOG_LEVELS[' | ||
+ | Logger.info(' | ||
+ | </ | ||
+ | |||
+ | Without root privileges it is not possibile for another Android app (e.g. a file browser) to access the log directory. The Kivy **app home** will be into the adopted SD card, under something like this: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | In older Android versions (e.g. Android 8) the app home directory will be something like: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Every time that the Kivy environment is initializated, | ||
- | * **[[https:// | ||
doc/appunti/prog/kivy.1551441656.txt.gz · Last modified: 2019/03/01 12:00 by niccolo