0

How to handle TV Turn off in widget

Hi everyone,

In our current TV widget, we want to do some tasks when users turn off the TV. I wonder if Yahoo! TV Widget platform generate any event to the widget before quiting in this situation (tv turned off)?

Any advice are welcome!

Tinh

by
2 Replies
  • You may try the onApplicationShutdown event, it is available for each widget before it is shutdown.

    Thanks,
    Vivek
    0
  • Hello Vivek,
    I've added an event handler for onApplicationShutdown, but my handler does not get fired when I turn off the simulator (by click on the X button of the simulator). So there are 2 possibilities here:
    1. My event handler code is not correct, I paste it here for verification:
    CODE
    this._appShutdownHandler.subscribeTo(KONtx.application, "onApplicationShutdown", this);
    _appShutdownHandler: function(event) {
    log("onApplicationShutdown is called");
    }

    2. The simulator does not fire the event onApplicationShutdown when it's closed.

    So my question is: In which situation the onApplicationShutdown will be generated (both on simulator and TV)?

    Many thanks in advance.

    Tinh
    0

Recent Posts

in General - Yahoo! TV Widgets