Logic of the mandatory restart of the application

We want to implement the logic of the mandatory restart of the application for ALL TVs after exiting sleep mode or after launching other applications.
Can you explain us how to do this correctly?

We ran into a problem that our application with the same settings in the config works differently on different models of TVs.
Can you tell us what settings will help us standardize the work of the application for all TV models?