Samsung Smart TV SDK provides various tools for the developers to develop applications and publish them in the app store. The TV users can then install these applications from the app store to their TVs. Once the application is installed, the users can access them using the TV remote, or gesture or through any other supported method of input interaction. So opening, closing and minimizing an application has become integral part in an application’s life cycle process. So any Smart TV developer should keep these events in mind when developing apps for Samsung Smart TV. This article will show proper methods to handle the opening and closing of applications in a Samsung Smart TV.
Opening an application
var widgetAPI = new Common.API.Widget(); widgetAPI.sendReadyEvent();
Application Access Point
Every application need to have a startup point from where it starts the execution. In Smart TV applications, it can be any function, provided that the functions gets executed on the Load event of the page. The startup function is the one that calls the sendReadyEvent function which then starts the application.
Closing the application
When the user clicks the return or exit button in the TV remote, the application closes or minimizes to the background. The application can also be closed programmatically by sending an exit event. This event can be sent by calling the sendExitEvent API call. Exiting by means of return or exit key will return the control to the Application Manager. Closing an application by means of sendExitEvent will return the control back to the TV
Opening and closing events are unavoidable events in the life cycle of a Smart TV application. Any developer who is developing apps for TV should have these two events in mind. The application being developed should handle these two events in such a way that, the applications will properly start up and will also smoothly close to the background when closed. This will enhance the user experience with the application. These events should be handled appropriately in order to avoid user dissatisfaction.