SF.SERVICE.SMARTREMOTE
** This class will not be supported in 2015.
All functionalities of sf.service.SmartRemote class are more improved, integrating with CAPH. Therefore sf.service.SmartRemote class is not supported since 2015 Smart TV. To use functions of sf.service.SmartRemote class, refer to here.
Used for controlling the interactive remote. Defines the SmartRemote Service API (Version 1.1.0).
Add the following line for sf.service.SmartRemote class into a html file your own : <script type="text/javascript" src="$MANAGER_WIDGET/Common/af/2.0.0/loader.js"></script> |
You can declare sf.service.SmartRemote class like this : ex) var smartRemote = sf.service.SmartRemote; |
Contents
Methods
destroy | ||
Description | ||
This function destroys the Interactive Remote. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.destroy(); |
hideLoading | ||
Description | ||
This function hides the loading of the image on Smart Device. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.hideLoading(); |
hidePopup | ||
Description | ||
This function hides the pop-up item. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.hidePopup(); |
init | ||
Description | ||
This function initializes the Interactive Remote. | ||
Parameters | ■callback - Function - Callback function to be called when the message from SmartRemote is received. | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.init(function () { // initialize completed }); |
parse | ||
Description | ||
This function parses the received response from Smart Device. | ||
Parameters | ■xmlstr - String - The string from smart remote to be parsed | |
Return | ■Object - The XML document object | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
var xmlObj = sf.service.SmartRemote.parse(xmlstr); |
readFile | ||
Description | ||
This function reads the files from SmartRemote.(Smart Phone app) | ||
Parameters | ■path - String - The file's path to read | |
Return | ■String - Contents of the file. | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
var agreement = sf.service.SmartRemote.readFile('agreement.dat'); |
sendMenuItem | ||
Description | ||
This function sends MenuItem to Smart Device. | ||
Parameters | ■items - Array<String>|String - The items to be sent | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.sendMenuItem(items); |
sendSourceItem | ||
Description | ||
This function sends the SourceItem to Smart Device. | ||
Parameters | ■items - Array<String>|String - The items to be sent ■menuId - String - The current source items Menu identifier value | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.sendSourceItem(items, menuId); |
showLoading | ||
Description | ||
This function loads an image on a Smart Device. | ||
Parameters | ■options - Object - The options for loading * title: (String) The title for loading | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
. |
showPopup | ||
Description | ||
This function shows the pop-up item. | ||
Parameters | ■options - Object - The options for showing popup * Title: , (String) Title of the popup * Descry: , (String) Description of the popup * buttonNames: , (Array<String>) Button texts for the popup * buttonURLs: , (Array<String>) Button Action URLs | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.SmartRemote.showPopup({ Title: 'Notice', Descry: 'New message received', buttonNames: ['OK'], buttonURLs: [nextURL] }); |