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.
- Scene Management
- Multi Language Support
- Play Video
- Display Images
- UI Components
Let us take a detailed look into these above features one by one.
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/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.
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.
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.
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.
The AppsFramework thus provides a convenient way to design UI applications in the Samsung Smart TV Platform versions pervious to 2015.