Franco Mossotto
Franco Mossotto

Reputation: 600

Android TV: turn on / standby screen from application code

I have a Philips Android TV and I'm looking to power on / power off (standby) the TV screen from the code of an Android application.

Is it possible? Which API allow to activate the screen? Which API to set the TV back in standby? I've searched Android API documentation and on internet but I've not found an API for that.

Upvotes: 2

Views: 2056

Answers (1)

loretoparisi
loretoparisi

Reputation: 16281

According to Declaring permissions that imply hardware features there is no permission that would enable such a function, and I think it makese sense since a user application should not be able to control an external device screen, that runs in an protected context, different from connected devices such as gamepad, camera, etc. That said, this does not mean that it's not possibile in any case

What an app can do is to keep the screen device on i.e. not lock the screen while the app is being used that is Keeping the Device Awake.

This is all related to the device policies handled by the DevicePolicyManager i.e. the interface for managing policies enforced on a device.

Upvotes: 1

Related Questions