Listening to events on the TV

I am trying to understand whether it’s possible for an app to listen to events or ‘system events’ having to do with other apps running on the TV. For example, if another app starts playing content, etc. I recall seeing a topic somewhere on such events (although not specific to what exactly can be captured), but can’t find it now. Doh! thx for any help. I’m hoping there’s an API for that…