Wakelock on android

356 views
Skip to first unread message

hci...@gmail.com

unread,
Jan 2, 2014, 2:50:23 PM1/2/14
to kivy-...@googlegroups.com
At one time all kivy apps prevented the screen from sleeping. I understand that this is not needed for all apps and so the default is now for them to recognize sleep mode. In our case however we need the screen to be always on. I have not found any documentation on how to do this, only docs on how to switch it off. How do I de-activate sleep mode for my apps?

Ben Rousch

unread,
Jan 2, 2014, 2:58:43 PM1/2/14
to kivy-...@googlegroups.com
If you're using buildozer, in buildozer.spec set:
  android.permissions = WAKELOCK
    and also 
  wakelock =  True

If you're not using buildozer, you need to add --permission WAKELOCK and I think also the --wakelock option to your build command.


On Thu, Jan 2, 2014 at 2:50 PM, <hci...@gmail.com> wrote:
At one time all kivy apps prevented the screen from sleeping. I understand that this is not needed for all apps and so the default is now for them to recognize sleep mode. In our case however we need the screen to be always on. I have not found any documentation on how to do this, only docs on how to switch it off. How do I de-activate sleep mode for my apps?

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
 Ben Rousch
   bro...@gmail.com
   http://clusterbleep.net/

hci...@gmail.com

unread,
Jan 2, 2014, 3:55:47 PM1/2/14
to kivy-...@googlegroups.com
I'm not using buildozer.spec. I have tried the below option but I only get and error when I use --wakelock in the build command. 

Ben Rousch

unread,
Jan 2, 2014, 4:00:37 PM1/2/14
to kivy-...@googlegroups.com
Something like this should work:
./build.py --package org.test.touchtracer --name touchtracer --version 1.0 --permission WAKELOCK --dir ~/code/kivy/examples/demo/touchtracer --wakelock debug

If it doesn't, make sure your python-for-android is up to date.


On Thu, Jan 2, 2014 at 3:55 PM, <hci...@gmail.com> wrote:
I'm not using buildozer.spec. I have tried the below option but I only get and error when I use --wakelock in the build command. 

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

hci...@gmail.com

unread,
Jan 2, 2014, 4:13:50 PM1/2/14
to kivy-...@googlegroups.com
Lol. Place it at the end.  Thanks it works now.
Reply all
Reply to author
Forward
0 new messages