top

ProductInfo API

To use Samsung Product API, 

<script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

Should be loaded in index.html

This module defines the product information functionalities provided by the Tizen Samsung TV Product API.

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Table of Contents

  1. 1. Interfaces
    1. 1.1. ProductInfoManagerObject
    2. 1.2. ProductInfoManager
    3. 1.3. ProductInfoConfigChangeCallback
    4. 1.4. ProductInfoConfigKey
    5. 1.5. ProductInfoNoGlass3dSupport
    6. 1.6. ProductInfoSiServerType
  2. 2. Full WebIDL

Summary of Interfaces and Methods

Interface Method
ProductInfoManagerObject  
ProductInfoManager DOMString getVersion ()
DOMString getFirmware ()
DOMString getDuid ()
DOMString getModelCode ()
DOMString getModel ()
unsigned short getSmartTVServerType ()
DOMString getSmartTVServerVersion ()
DOMString getTunerEpop ()
boolean isSoccerModeEnabled ()
boolean isTtvSupported ()
boolean isUdPanelSupported ()
DOMString getRealModel ()
ProductInfoNoClass3dSupport getNoGlass3dSupport ()
DOMString getLocalSet ()
DOMString getSystemConfig (unsigned int key)
void setSystemConfig(unsigned int key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
unsigned long addSystemConfigChangeListener(ProductInfoConfigChangeCallback listener, unsigned int key);
void removeSystemConfigChangeListener(unsigned long listenerId);
ProductInfoConfigChangeCallback void onchange (unsigned int key)
ProductInfoConfigKey  
ProductInfoNoGlass3dSupport  
ProductInfoSiServerType  

1. Interfaces

1.1. ProductInfoManagerObject

Defines a WebApi object instance of the Tizen Samsung TV Product API.
The webapis.productinfo object enables access to ProductInfo API functionality.

[NoInterfaceObject]interface ProductInfoManagerObject {
  readonly attribute ProductInfoManager productinfo;
};

  WebApi implements ProductInfoManagerObject;

Attributes

1.2. ProductInfoManager

Provides methods for ProductInfo functionalities.

[NoInterfaceObject]interface ProductInfoManager {
  attribute ProductInfoConfigKey ProductInfoConfigKey;
  attribute ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport;
  attribute ProductInfoSiServerType ProductInfoSiServerType;

  DOMString getVersion();
  DOMString getFirmware();
  DOMString getDuid();
  DOMString getModelCode();
  DOMString getModel();
  ProductInfoSiServerType getSmartTVServerType();
  DOMString getSmartTVServerVersion();
  DOMString getTunerEpop();
  boolean isSoccerModeEnabled();
  boolean isTtvSupported();
  boolean isUdPanelSupported();
  DOMString getRealModel();
  ProductInfoNoGlass3dSupport getNoGlass3dSupport();
  DOMString getLocalSet();
  DOMString getSystemConfig(ProductInfoConfigKey key);
  void setSystemConfig(ProductInfoConfigKey key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
  unsigned long addSystemConfigChangeListener(ProductInfoConfigKey key, ProductInfoConfigChangeCallback listener);
  void removeSystemConfigChangeListener(unsigned long listenerId);
  boolean isUHDAModel();
};

Attributes

Methods

getVersion
Retrieves the plugin version number.

DOMString getVersion();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Plugin version

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getVersion();
  console.log(" version value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getFirmware
Retrieves the firmware information.

	DOMString getFirmware();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Firmware version

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getFirmware();
  console.log(" Firmware value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
 
getDuid
Retrieves the DUID.

	DOMString getDuid();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

DUID

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getDuid();
  console.log(" Duid value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getModelCode
Retrieves the model code, such as "15_HAWKP".

DOMString getModelCode();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Model code

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getModelCode();
  console.log(" ModelCode value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getModel
Retrieves the model name, such as "UJS9500".

	DOMString getModel();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Model name

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getModel();
  console.log(" Model value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getSmartTVServerType
Retrieves the infolink server type.

ProductInfoSiServerType getSmartTVServerType();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Infolink server type

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getSmartTVServerType();
  console.log(" smart tv server type = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getSmartTVServerVersion
Retrieves the infolink server version, such as "T-INFOLINK2014-1002".

DOMString getSmartTVServerVersion();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Infolink server version

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getSmartTVServerVersion();
  console.log(" smart tv server version = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getTunerEpop
Retrieves the tuner value from factory information.

DOMString getTunerEpop();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Tuner value

Exceptions:

  • WebAPIException
    • with error type NotSupportedError, if the device is a BD device.

    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getTunerEpop();
  console.log(" Tuner Epop = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
isSoccerModeEnabled
Checks whether the TV Soccer Mode is enabled.

boolean isSoccerModeEnabled();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Boolean value:
  • true: Enabled
  • false: Disabled

Exceptions:

  • WebAPIException
    • with error type NotSupportedError, if the device is a BD device.

    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.isSoccerModeEnabled();
  console.log(" SoccerMode = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
isTtvSupported
Checks whether TTV is supported.

boolean isTtvSupported();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Boolean value:
  • true: Supported
  • false: Not supported

Exceptions:

  • WebAPIException
  • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.isTtvSupported();
  console.log(" support = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
isUdPanelSupported
Checks whether UdPanel is supported.

boolean isUdPanelSupported();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Boolean value:
  • true: Supported
  • false: Not supported

Exceptions:

  • WebAPIException
  • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.isUdPanelSupported();
  console.log(" support = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getRealModel
Retrieves the full model name, such as UN65JS9500.

DOMString getRealModel();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Model name

Exceptions:

  • WebAPIException
  • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getRealModel();
  console.log(" ModelName value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getNoGlass3dSupport
Checks whether glasses-free 3D is supported.

ProductInfoNoGlass3dSupport getNoGlass3dSupport();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

NoGlass3dSupport value

Exceptions:

  • WebAPIException
  • with error type NotSupportedError, if the device is a BD device.

  • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getNoGlass3dSupport();
  console.log(" 3dSupport value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getLocalSet
Retrieves the local set.

DOMString getLocalSet();

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

LocalSet value

Exceptions:

  • WebAPIException
  • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getLocalSet();
  console.log(" LocalSet value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
getSystemConfig
Retrieves the value for the specified system configuration key, such as service country code.

DOMString getSystemConfig(ProductInfoConfigKey key);

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • key: Product info configuration key

Return value:

System configuration value

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)

    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.getSystemConfig(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE);
  console.log("SystemConfig value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
setSystemConfig
Sets the value for the specified system configuration key.

void setSystemConfig(ProductInfoConfigKey key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • key: Product info configuration key
  • value: Value to set
  • onsuccess [optional]: Callback method to invoke when the system configuration key value is successfully set
  • onerror [optional]: Callback method to invoke if an error has occurred

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any of the input parameters contain an invalid value.
      If only setSystemConfig can set CONFIG_KEY_DATA_SERVICE or CONFIG_KEY_ACTIVE_CATEGORY (Since plugin version 3.0)

    • with error type NotSupportedError, if 'CONFIG_KEY_SERVICE_COUNTRY' is readonly (Deprecated since plugin version 3.0)

    • with error type NotSupportedError, if 'CONFIG_KEY_SHOPLOGO' is readonly (Deprecated since plugin version 3.0)

    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


function onsuccess(data)  {
  console.log("SystemConfig data = " + data);
}
function onerror(error)  {
  console.log("error code : " + error.code);
}
try {
  webapis.productinfo.setSystemConfig(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE, value, onsuccess, onerror);
} catch (error) {
  console.log(" error code = " + error.code);
}
addSystemConfigChangeListener
Registers a system configuration change listener.

unsigned long addSystemConfigChangeListener(ProductInfoConfigKey key, ProductInfoConfigChangeCallback listener);

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • listener: ProductInfoConfigChangeCallback listener
  • key: Product info configuration key

Return value:

unsigned long return value of listener id

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)

    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.addSystemConfigChangeListener(webapis.productinfo.ProductInfoConfigKey.CONFIG_KEY_DATA_SERVICE, listener);
  console.log(" add Listener value = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}
removeSystemConfigChangeListener
Unregisters a system configuration change listener.

void removeSystemConfigChangeListener(unsigned long listenerId);

Since : 2.3

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Parameters:

  • listenerId: ProductInfoConfigChangeCallback ID

Exceptions:

  • WebAPIException
    • with error type TypeMismatchError, if an input parameter is not compatible with its expected type.

    • with error type InvalidValuesError, if any of the input parameters contain an invalid value. (Since plugin version 3.0)

    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  webapis.productinfo.removeSystemConfigChangeListener(listenerId);
  console.log(" removedListener value ");
} catch (error) {
  console.log(" error code = " + error.code);
}
isUHDAModel
Checks whether the device supports Ultra HD Premium features.

boolean isUHDAModel();

Since : 3.0

Product : TV, AV_BD

Privilege level: public

Privilege: http://developer.samsung.com/privilege/productinfo

Return value:

Boolean value:
  • true: Supported
  • false: Not supported

Exceptions:

  • WebAPIException
    • with error type SecurityError, if the application does not have the privilege to call this method.

Code example:


try {
  var value = webapis.productinfo.isUHDAModel();
  console.log(" support = " + value);
} catch (error) {
  console.log(" error code = " + error.code);
}

1.3. ProductInfoConfigChangeCallback

Defines the product info configuration change callback.

[Callback = FunctionOnly, NoInterfaceObject]interface ProductInfoConfigChangeCallback {
  void onchange(ProductInfoConfigKey key);
};

Methods

onchange
Callback method for product info configuration changes.

  void onchange(unsigned short key);             

Since : 2.3

Product : TV, AV_BD

Parameters:

  • key: Key of each ProductInfo config

Code example:


var onchange = function (key){
  console.log(" changed key is = " + key);
}

1.4. ProductInfoConfigKey

Defines constants for product info configuration keys.

[NoInterfaceObject]interface ProductInfoConfigKey {
  const unsigned long CONFIG_KEY_DATA_SERVICE = 0;
  const unsigned long CONFIG_KEY_SERVICE_COUNTRY = 1;
};

Since : 2.3

Constants

  • CONFIG_KEY_DATA_SERVICE
    Data service configuration, it can be setted as string ype with numbers

    Since : 2.3

  • CONFIG_KEY_SERVICE_COUNTRY
    Service country, readonly

    Since : 2.3

1.5. ProductInfoNoGlass3dSupport

Defines constants for glasses-free 3D support.

[NoInterfaceObject]interface ProductInfoNoGlass3dSupport {
  const unsigned long NO_GLASS_3D_NOT_SUPPORTED = 0;
  const unsigned long NO_GLASS_3D_SUPPORTED = 1;
};

Since : 2.3

Constants

  • NO_GLASS_3D_NOT_SUPPORTED
    Glasses-free 3D is not supported

    Since : 2.3

  • NO_GLASS_3D_SUPPORTED
    Glasses-free 3D is supported

    Since : 2.3

1.6. ProductInfoSiServerType

Defines constants for infolink server types.

[NoInterfaceObject]interface ProductInfoSiServerType {
  const unsigned long SI_TYPE_OPERATIING_SERVER = 0;
  const unsigned long SI_TYPE_DEVELOPMENT_SERVER = 1;
  const unsigned long SI_TYPE_DEVELOPING_SERVER = 2;
};

Since : 2.3

Constants

  • SI_TYPE_OPERATIING_SERVER
    Operating

    Since : 2.3

  • SI_TYPE_DEVELOPMENT_SERVER
    Development

    Since : 2.3

  • SI_TYPE_DEVELOPING_SERVER
    Developing

    Since : 2.3

2. Full WebIDL


module ProductInfo {
  [NoInterfaceObject]interface ProductInfoManagerObject {
    readonly attribute ProductInfoManager productinfo;
  };

  WebApi implements ProductInfoManagerObject;

  [NoInterfaceObject]interface ProductInfoManager {
    attribute ProductInfoConfigKey ProductInfoConfigKey;
    attribute ProductInfoNoGlass3dSupport ProductInfoNoGlass3dSupport;
    attribute ProductInfoSiServerType ProductInfoSiServerType;

    DOMString getVersion();
    DOMString getFirmware();
    DOMString getDuid();
    DOMString getModelCode();
    DOMString getModel();
    ProductInfoSiServerType getSmartTVServerType();
    DOMString getSmartTVServerVersion();
    DOMString getTunerEpop();
    boolean isSoccerModeEnabled();
    boolean isTtvSupported();
    boolean isUdPanelSupported();
    DOMString getRealModel();
    ProductInfoNoGlass3dSupport getNoGlass3dSupport();
    DOMString getLocalSet();
    DOMString getSystemConfig(ProductInfoConfigKey key);
    void setSystemConfig(ProductInfoConfigKey key, DOMString value, optional SuccessCallback ? onsuccess, optional ErrorCallback ? onerror);
    unsigned long addSystemConfigChangeListener(ProductInfoConfigKey key, ProductInfoConfigChangeCallback listener);
    void removeSystemConfigChangeListener(unsigned long listenerId);
    boolean isUHDAModel();
  };

  [Callback = FunctionOnly, NoInterfaceObject]interface ProductInfoConfigChangeCallback {
    void onchange(ProductInfoConfigKey key);
  };

  [NoInterfaceObject]interface ProductInfoConfigKey {
    const unsigned long CONFIG_KEY_DATA_SERVICE = 0;
    const unsigned long CONFIG_KEY_SERVICE_COUNTRY = 1;
  };

  [NoInterfaceObject]interface ProductInfoNoGlass3dSupport {
    const unsigned long NO_GLASS_3D_NOT_SUPPORTED = 0;
    const unsigned long NO_GLASS_3D_SUPPORTED = 1;
  };

  [NoInterfaceObject]interface ProductInfoSiServerType {
    const unsigned long SI_TYPE_OPERATIING_SERVER = 0;
    const unsigned long SI_TYPE_DEVELOPMENT_SERVER = 1;
    const unsigned long SI_TYPE_DEVELOPING_SERVER = 2;
  };
};