Tizen API: ProductInfo - Samsung/cordova-plugin-toast GitHub Wiki

For converting ProductInfo API of tizen to TOAST API, please refer to the followings.

cordova spec (cordova-plugin-device)

Please note that device plugin is based on cordova spec. If you want get more details for usage, refer cordova-plugin-device

privilege

Please add following privilege in the config.xml

<tizen:privilege name="http://developer.samsung.com/privilege/productinfo"/>

get ModelCode

  • Before

    var model = webapis.productinfo.getModelCode();
    
  • After

    var model = device.model;
    

get Firmware Version

  • Before

    var version = webapis.productinfo.getFirmware();
    
  • After

    var version = device.version;
    

get Duid (Device unique id)

  • Before

    var duid = webapis.productinfo.getDuid();
    
  • After

    var duid = device.uuid;
    

cordova spec (cordova-plugin-globalization)

Please note that globalization plugin is based on cordova spec. If you want get more details for usage, refer cordova-plugin-globalization


get countryCode

  • Before

    var countryCode = webapis.productinfo.getDuid();
    
  • After

    navigator.globalization.getLocaleName(function(value) {
        // value : countryCode
        console.log('Success: ' + value);
    }, function(err) {
        console.log('Error: ' + err.message);
    })