4

The application that we are developing in Tizen, is supposed to collect the data from multiple devices. Therefore, I need to send the device-ID (or anything which is unique for every watch) along with other collected data.

I would like to know if there is such an API in Tizen to get the device-ID or any other unique identifier for the watch.


UPDATED
I first tried to get device DUID using SystemInfoDeviceCapability:
var cap = tizen.systeminfo.getCapabilities();
console.log("Or this damn thing: " + cap.duid);

But it seems that duid is not defined for Tizen-Wearable, I guess!

Then I followed the manual, in which it clearly says SystemInfo.DUID is the attribute I am looking for. So I tried:

tizen.systeminfo.getPropertyValue("http://tizen.org/system/tizenid",
    function (param) {
        console.log("TIZEN-ID: " + param);
    }, function (error) {
    console.log("An error occurred " + error.message);
});

This time I get an error, sayin type mismatch, which is probably because this key http://tizen.org/system/tizenid is not in the list which SystemInfo can work with. This list, only contains:

  • "BATTERY"
  • "CPU"
  • "STORAGE"
  • "DISPLAY"
  • "DEVICE_ORIENTATION"
  • "BUILD"
  • "LOCALE"
  • "NETWORK"
  • "WIFI_NETWORK"
  • "CELLULAR_NETWORK"
  • "SIM"
  • "PERIPHERAL"
  • "MEMORY"

    None of the above gives me a unique ID for the gear S watch. Is there anywhere else I should be looking for this?

  • Matin Kh
    • 5,192
    • 6
    • 53
    • 77

    2 Answers2

    6

    To get the DUID you can use the following:

    var tizenId = tizen.systeminfo.getCapability('http://tizen.org/system/tizenid');
    

    or this one (note this is not recommended as it will be deprecated in the future)

    var tizenId = tizen.systeminfo.getCapabilities()['duid']; // NOT RERECORDED
    

    Also beaware that the DUID is NOT unique all the time (if you reset the watch you will get a new ID) So I suggest you use the MAC Address which is unique per hardware:

    tizen.systeminfo.getPropertyValue("WIFI_NETWORK",function(e){
          console.log(e.macAddress);
    })
    
    Ateik
    • 2,458
    • 4
    • 39
    • 59
    0

    I think you should look on those two:

    https://developer.tizen.org/dev-guide/2.3.0/org.tizen.guides/html/native/system/sysinfo_n.htm#system

    https://developer.tizen.org/dev-guide/2.3.0/org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__SYSTEM__INFO__MODULE.html