Introduction to Smart TV platform
The article provides general information about Samsung Smart TV platform features and prepares the reader to start writing widget applications.
Samsung Smart TV is a platform that integrates Internet and web features in TVs and set-top boxes, as well as provides a way for technological convergence between those TVs and other devices like computers, smartphones and tablets. The main idea is to run applications which connect to the Internet and allow the user to interact with different types of content, while at the same time making it possible to use TV-specific features, like playing video or changing volume.
Introductory description of Samsung Smart TV applications and their architecture is available in Smart TV Applications.
Developing applications for Samsung Smart TV platform is slightly different from developing web pages for the Internet. The platform offers many new features, but it brings some restrictions into the development process too.
The main differences between Web and Smart TV development are listed below:
- Web development is usually done for many different browsers. Smart TV platforms are based on two engines so far: Gecko, for platforms 2011 and 2010, and WebKit for newer platforms.
- Web development has to support responsive layouts, adjusting them for different resolutions and screen sizes. Smart TV applications should support three major resolutions: 960 x 540, 1280 x 720 and 1920 x 1080 pixels.
- Web pages are usually displayed in a web browser on a computer or mobile device screen. Smart TV applications run on a TV and can use all the advantages of its large display.
- A regular web page or application is usually controlled by a keyboard and mouse or some sort of touch interface. Smart TV applications can be controlled using a remote control, a mouse, gestures or voice.
Main features which are available on Samsung Smart TV through those APIs have been divided into the following sections:
- Audio and Video in applications,
- Interactivity (Smart Interaction, Voice control, Gesture control),
- SSO (Single Sign-On),
- IME (Input Method Editor).
Detailed Smart TV Player specification can be found in Player Specification.
You can find an introduction to playing audio and video on Samsung Smart TV in Play Audio and Video.
You can find a detailed tutorial on creating a video application with playback and volume control in Creating a Video Application.
You can read about creating an application with HTTP Adaptive Streaming features in Creating a Video Application With HAS (HTTP Adaptive Streaming).
In the context of Smart TV, interactivity means controlling the TV with a device other than the remote control, e.g. a smartphone. There is a dedicated application provided by Samsung for various mobile operating systems (Samsung Remote for Android, Samsung SmartView for iPhone and iPad). It lets users control their TVs with a mobile device acting as a remote control with extended functionalities.
An article with description of interactive remote functionalities can be found in Interactivity.
Since 2012, hing-end Samsung Smart TV models are equipped with built-in camera and microphone. It is possible to interact with Smart TV using voice and gesture control commands.
Voice control allows the user to control the Smart TV using voice commands. It is also possible to use a special remote control with a microphone (Smart Remote). Voice recognition operates in two modes:
- server mode: it is a free speech-to-text mode in which a voice sample is sent to a server where it is recognized and returned as text; server recognition is available for many languages.
- candidate words mode: is a mode in which the recognition engine in the device tries to match the voice sample to a list of candidate words; that mode is a little faster than server mode, because it works locally.
For more information about voice recognition go to Using a Recognition Application.
Gesture UI allows the user to control the TV with single-hand gestures. The TV can be controlled with four predefined gestures provided by Samsung:
- pointer - moving the pointer on the screen.
- grab - selecting an item that is currently under the pointer, performing the same action as the ENTER button on the remote control.
- return - performing the same action as the RETURN button on remote control.
- scroll - scrolling the content on the screen in horizontal or vertical direction.
There is no possibility to use or add any other gestures.
Convergence Framework enables bidirectional communication between a TV and other devices to exchange messages, including file attachments. This communication is based on a messaging system, which is described in detail in Messaging System.
The Convergence Framework makes it possible for devices connected to a network to discover each other using UPnP, and then communicate over HTTP using RESTful interfaces.
The Convergence API includes the following communication types:
Single Sign-On is a mechanism for managing the user account information for Smart TV applications. The encrypted account information is saved in a database and is available to respective applications. Thanks to this, the user doesn’t have to repeatedly re-enter personal information.
IME (Input Method Editor) is a common module which enables text input in applications. Smart TV users can enter text using a remote control. IME displays a virtual keyboard on the screen (qwerty or mobile phone style) and maps the remote contoller’s input to appropriate characters.
- Application API which wraps some of the functionalities of the two older ones and complements them with new features of 2012 platform. The API reference can be found in Application API.
Samsung Smart TV SDK is an environment in which you can develop, run and debug applications as well as build packages for Samsung Smart TV. There are two major releases of Samsung Smart TV SDK available: - Eclipse release (available from SDK version 3.5), - standalone release (available up to SDK version 3.5.2).
The Eclipse release is the regular Eclipse IDE with Samsung Smart TV SDK merged into it.
To download the Samsung Smart TV SDK, visit SDK Download page.
There are three types of project templates available in Samsung Smart TV SDK:
For more information please refer to the articles: * Samsung Application API: Application API
The target device to run the application is a TV and therefore it is advisable to also use it while testing the application. If it is not possible to run the application on a TV, you can test your application on the Emulator. Testing on the Emulator can be used as an indication of possible errors in the application. It also takes less time to verify the application using the Emulator, as it is not required to transfer the application to a device.
There are Emulators of each platform version delivered together with the Samsung Smart TV SDK. Thanks to that, it is possible to run the application in an environment that is very similar to the platform version, in case you have no access to the hardware. The latest version of the Samsung Smart TV SDK includes Emulators of all platforms:
- SDK Emulator 1.5 - for 2010 platform
- SDK Emulator 2.5 - for 2011 platform
- SDK Emulator 3.5 - for 2012 platform
- SDK Emulator 4.5 - for 2013 platform
- SDK Emulator 5.0 Beta - for 2014 platform
Applications running on different versions of the Emulator can behave differently, and can generate different types of errors. Due to running on different hardware, the Emulators will never fully reflect all the capabilities and features of a real device. It is strongly recommended to always test your applications on a real device.
You can either use the Samsung Smart TV SDK JS debugger tool, or Web Inspector tools that you can access in the 2012 Emulator’s debug mode. Please refer to those articles to find more information about how to use the JS debugger or Web Inspector tools:
Uploading an application to Samsung Smart TV platform
You can deploy the newly created application to the Samsung Smart TV platform by:
- Creating a package and sending it to TV using the Samsung Smart TV SDK, and you can test Application on a TV
- Copying the application to an USB memory and running it on TV. This method works only on 2012 platform and is not recommended.
You can find more information on packaging and launching the applications in Packaging and Launching Applications.
- Certification process - You can find application certification process described in details in the Support section http://www.samsungdforum.com/Support/index