Author Topic: OPtion to disable screen sleep?  (Read 1235 times)

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2410
  • Karma: +112/-139
OPtion to disable screen sleep?
« on: June 14, 2014, 07:01:59 pm »
I'm not sure if th ecurrent beta already has this ability but it would be nice if it could be added.

Can you allow Authomation to prevent the screen from going to sleep? I use my tablet at work to keep an eye on my dogs. I've looked all over but can't seem to find this option in your app. Unfortunately the screen 'sleep' on my tablet settings is a maximum of 30 minutes, which means the screen turns off and the app seems to stop.

For example, ImperiHome has this option and I can leave the tablet (HP Touchpad on Touchstone charger) on the whole day and sneak a peak at the kids at my leisure.

If I am not mistaken, this is the function to call to implement this as eg an option in the settings:

public void setKeepScreenOn (boolean keepScreenOn)
Added in API level 1

Controls whether the screen should remain on, modifying the value of KEEP_SCREEN_ON.

Related XML Attributes
android:keepScreenOn

Parameters
keepScreenOn    Supply true to set KEEP_SCREEN_ON.

-----
public boolean getKeepScreenOn ()
Added in API level 1

Returns whether the screen should remain on, corresponding to the current value of KEEP_SCREEN_ON.
Related XML Attributes

    android:keepScreenOn

Returns

    Returns true if KEEP_SCREEN_ON is set.
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline krisstoff

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: OPtion to disable screen sleep?
« Reply #1 on: March 09, 2015, 11:29:47 am »
Hi, if you are using an android tablet there is an option in the settings menu, go to developer options, then tick stay awake (this only works when the charger is connected)

Hope this helps

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2410
  • Karma: +112/-139
Re: OPtion to disable screen sleep?
« Reply #2 on: March 09, 2015, 11:33:22 am »
Yeah, found that one a while after I posted but Garrett put the option into the latest beta already. :)
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W