Friday 9 July 2021

Chromecast Android TV turn external screen ON

I'm developing a screen save app for the Google Chromecast, which should be connected to the external screen. And I'm using code to wake up the screen at the specific time defined by the user. It works fine on an android TV emulator.

    val power = applicationContext?.getSystemService(POWER_SERVICE) as PowerManager
    val lock = power.newWakeLock(
        PowerManager.FULL_WAKE_LOCK or PowerManager.ACQUIRE_CAUSES_WAKEUP
                or PowerManager.ON_AFTER_RELEASE, applicationContext?.packageName + ":wakeup!"
    )

    lock.acquire(0)
    lock.release()

But I have an issue with the real device connect to the external TV display. After 15 minutes of inactivity, the TV display goes to sleep, and Google Chromecast cannot wake the TV display.

Is there any way to wake the display?

Google Home application wakes the display with a voice command.

Maybe some access to google home API?



from Chromecast Android TV turn external screen ON

No comments:

Post a Comment