Detect the TV on/off status to reload app

Hello everyone, I am developing an application on smart tv and hotel tv, I am being requested by the customer that after turning off the application and then turning it back on immediately, the application must be reloaded from the beginning.

Can everyone tell me how to detect the TV on/off status?

I hope to receive help from everyone, thank you.

This forum is only for webOS TV apps. And for webOS TV, there is currently no API provided to automatically launch an app when the TV is turned on. If your app is for LG Pro:Centric, please contact Pro:Centric Developer Support. Thank you.