Samsung Smart TV – AppsFramework

The Samsung Smart TV AppsFramework provides a very high level set of APIs for streamlined development of web applications in Smart TV models before 2015. The AppsFramework provides a rich feature set for ease of development. Almost all the functionalities of the AppsFramework are optimized and currently integrated into the CAPH framework. The CAPH framework provides support for Samsung Smart TV versions from 2015 onwards. Using the AppsFramework the user can concentrate on the business logic and avoid so many function calls for implementing the trivial tasks like getting user input, show/hide UI elements, event management etc. The Samsung Smart TV SDK has project wizards that enables the user to set up the AppsFramework project. The AppsFramework provides the following feature set.

  • Framework
  • Scene Management
  • Multi Language Support
  • Play Video
  • Display Images
  • UI Components

Let us take a detailed look into these above features one by one.

Framework

The Smart TV SDK has project wizards that help the user to create an AppsFramework application in an effortless manner. A project created using such a project wizard has the following folders

app/html contains the html files for each scene in the application
app/scenes contains the JavaScript files for each scene in the application
app/stylesheets contain the styles for each scene
app/init.js contain the code for the application life cycles like startup and shutdown
icon contain the application icons
images contain the application image files
lang contain the supported language files
app.json the AppsFramework application configuration
config.xml the Smart TV application configuration
index.html the landing page of the app

The AppsFramework follows something called a scene based architecture. In this architecture, every page or is managed as a scene and each scene has the corresponding UI elements in it, that interacts with the user.

Scene Management

In an AppsFramework application everything is managed as scenes. A scene is just like a canvas in which a few UI elements are drawn based on the application requirement. The scene window can be shown or hidden and it has focussed and blurred states. The overall application management will be like creating scenes based on the application requirements and the corresponding UI elements in those scenes. Then based on the user input, each scene can be hidden or shown or blurred or focussed to vary the content shown to the user. For example, an inventory application can show a login scene first, and then hide that scene and show the dashboard scene after the login success action. Each scene has its own HTML, CSS and JavaScript files. The individual scenes are identified using a scene Id.  The corresponding files associated with the scenes are named as follows

HTML file sceneId.html
CSS file sceneId.css
JS file sceneId.js

All these scene contents are managed by the scene manager, which provides API to manage the scenes. Each corresponding files associated with the scenes are initialized and the JavaScript files are instantiated. These API methods can the used by the user or system programs to controls the scenes in the application.

Multi language support

The AppsFramework provides support for multiple languages. The support for multiple languages can be evident from the display of various language content on the On Screen Device menu. Some most commonly used languages are provided default support. Using AppsFramework, applications can provide support for custom languages by providing the language files along with the application in the ISO 639-1 format. The language files are normally included in the app/languages folder. The language support files are named based on the specific language id. The supported languages by the application are listed by the app.json file, which is initialized during the application start-up. The application manager, loads the supported languages one by one. By default, the first among the language list is supported and, the OSD menu contents will be displayed in that particular language. If none of the application languages are supported, then the default set system language of the smart TV will be used.

Play Video

Playing video files using the AppsFramework is done by the VideoPlayer component service. The VideoPlayer provides API that enables us to play supported video files in full screen as well as partial screen modes.

Display Images

Displaying of images in the AppsFramework is provided by the ImageViewer component. Similar to the VideoPlayer, the ImageViewer component also provides API for displaying supported images in full screen as well as partial screen mode. Both the image and the video components can also handle remote key event handlers using the setKeyHandle function.

UI Components

The AppsFramework provides a list of customizable UI components that can be used for designing web applications in a fast paced manner. The UI Components are mostly web components that use the common web technologies like HTML, CSS and JavaScript for its rendering. AppsFramework makes heavy use of jQuery. The components can be customized by modifying the associated script files, changing the styles, changing the rendered HTML etc. The UI components provided the most commonly used elements ready made for the developer, that enables him/her to concentrate on the business logic, rather than spending time on the design part from scratch.

The AppsFramework thus provides a convenient way to design UI applications in the Samsung Smart TV Platform versions pervious to 2015.

 




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *