playMaker

Author Topic: Activate / Desactivate SleepMode[SOLVED]  (Read 2865 times)

Loganou974

  • Playmaker Newbie
  • *
  • Posts: 18
Activate / Desactivate SleepMode[SOLVED]
« on: October 22, 2013, 10:19:49 AM »
Hi,

i just wanted to ask if there was an action that use SleepTimeout.NeverSleep so we can prevent the Android or iOS device from getting into Sleep Mode !

I searched all over the forums but did not find it anywhere.

Thanks !
« Last Edit: September 24, 2015, 09:23:25 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Activate / Desactivate SleepMode
« Reply #1 on: October 23, 2013, 02:27:52 AM »
Hi,

 here we go:

http://hutonggames.com/playmakerforum/index.php?topic=5264.msg25124#msg25124

 untested, so tell me if that works for you, thanks :)

Bye,

 Jean
« Last Edit: April 21, 2014, 08:37:50 AM by jeanfabre »

kretin

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Activate / Desactivate SleepMode
« Reply #2 on: August 24, 2015, 08:20:22 PM »
Quote
I tried this, but it didn't work on my HTC One. I changed it to (int)SleepTimeout.NeverSleep which did work.

I didn't change SystemSetting, but when I quit my app the screen turned off, so I'm guessing it worked.

I didn't get around to trying iOS or other android devices yet.

My bad, Application Focus didn't seem to be getting called when I return to the app, so it was working on first run, but then not on subsequent runs.

So yeah, it seems to work fine :)

« Last Edit: August 25, 2015, 01:39:57 AM by kretin »