2

I am developing an app with the Kivy framework and I am trying to figure out how to avoid the system screen timeout.

I would like to completely disable the screen turning off (due to screen timeout) while using the app.

I checked the kivy.config module, but I didn't find any conclusive option.

https://kivy.org/doc/stable/api-kivy.config.html

Any ideas?

Alexandru Rusu
  • 569
  • 1
  • 5
  • 21

1 Answers1

3

Looking further, I found the solution. I thought not to delete the question, maybe someone else is facing this.

Solution: edit buildozer.spec and set

android.wakelock = True
Alexandru Rusu
  • 569
  • 1
  • 5
  • 21
  • I believe you must also include `android.permissions = WAKE_LOCK`, and you may need to do some coding to request that permission at runtime. – John Anderson Apr 14 '20 at 22:08
  • I suppose the permissions are required when the app the accesses the storage or the camera. For this wakelock option, it was not necessary to set android.permissions. In my buildozer.spec android.permissions is not set. – Alexandru Rusu Apr 16 '20 at 04:21