Skip to content

Legacy API: TVInfo

Hyojin Kim edited this page Mar 21, 2017 · 8 revisions

For converting TVInfo API of Legacy to TOAST API, please refer to the followings.

toast.drminfo

If you want more information, please refer to toast.drminfo

getEsn

  • Before

    /* SEF */
    var result = sef.Execute('GetESN', 'YourServiceName');
    /* webapis */
    var result = webapis.tv.info.getESN('YourServiceName');
  • After

    toast.drminfo.getEsn('YourServiceName', function(value) {
        // YourComponentName : Name of component what you want to get Esn data.
        // value : Esn data of given component name
        console.log('Success: ' + value);
    }, function(err) {
        console.log('Error: ' + err.message);
    });

getSdi

  • Before

    /* SEF */
    var result = sef.Execute('GetSDI_ID');
    /* webapis */
    /* Not supported */
  • After

    toast.drminfo.getSdi(function(value) {
        // value : SDI (Samsung Device Identifier)
        console.log('Success: ' + value);
    }, function(err) {
        console.log('Error: ' + err.message);
    });

cordova spec (cordova-plugin-device)

For converting tv.info API of Legacy platform to TOAST API, please refer to the followings. Please note that device plugin is based on cordova spec. If you want get more details for usage, refer cordova-plugin-device

get ModelCode

  • Before

    var model = webapis.tv.info.getModel();
  • After

    var model = device.model;

get Firmware Version

  • Before

    var version = webapis.tv.info.getFirmware();
  • After

    var version = device.version;

get Duid

  • Before

    var duid = webapis.tv.info.getDeviceID();
  • After

    var duid = device.uuid;
Clone this wiki locally