3

Is it possible to programmatically to turn the TV On/Off via the Web (or other) APIs from within Tizen? (Can't find any reference to this in docs)

Boris
  • 3,163
  • 5
  • 37
  • 46

1 Answers1

3

Up until Tizen 4.0 it was possible to use these (now deprecated) Power API calls:

tizen.power.turnScreenOn();
tizen.power.turnScreenOff();

These has now changed to:

//Turn on
tizen.power.request("SCREEN", "SCREEN_NORMAL");

//Turn off
tizen.power.request("SCREEN", "SCREEN_OFF");

NOTE: That SCREEN_OFF cannot be requested directly and has to be called in a event handler.

You can read more about managing power resources here.

Sanguinary
  • 354
  • 2
  • 3
  • 16
  • Appears like this is only for wearable devices and not enabled for TV/Monitors – Boris Mar 17 '20 at 10:02
  • @Boris Take a look at [this](https://docs.tizen.org/iot/api/5.0/tizen-iot-headed/group__CAPI__SYSTEM__DEVICE__POWER__MODULE.html) – Sanguinary Mar 20 '20 at 20:16
  • @Sanguinary so it means that this can be called only from C apps and not from web apps? Do you know the reason why it is like that? Is there some kind of JS wrapper around the C api? Thanks – mrtn Sep 25 '22 at 17:51