Languages

Menu
Sites
Language
Getting Device UID failing with E_SYSTEM

Hi folks.

I tried adding http://tizen.org/privilege/system to the manifest.xml, but no luck. In the api docks there are no privilage requirement listed, while in the System Information API Guide there is a http://tizen.org/api/systeminfo privilege prerequisit.

Or is it fails becouse its running on a test device, and it will work on a 'real' device?
The device and sdk is 2.1.

The code i use to get the duid:

String deviceUniqueId;
result r = SystemInfo::GetValue(L"http://tizen.org/system/duid", deviceUniqueId);
if (r != E_SUCCESS)
{
  switch (r) {
       case E_OBJ_NOT_FOUND:
           AppLogDebugTagInternal("Debug", __PRETTY_FUNCTION__, __LINE__, "GetValue - duid failed: E_OBJ_NOT_FOUND"); break;
       case E_SYSTEM:
           AppLogDebugTagInternal("Debug", __PRETTY_FUNCTION__, __LINE__, "GetValue - duid failed: E_SYSTEM"); break;
       default:
          AppLogDebugTagInternal("Debug", __PRETTY_FUNCTION__, __LINE__, "GetValue - duid failed: unknown error %X", r); break;
  }
  id = new std::string("DEFAULT_DEVICE_ID");
}
else
    ...

Any tips?

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 Replies
kavish
check given link. https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.web.device.apireference%2Ftizen%2Fsysteminfo.html
Ben
Hi kavish, thx for your efforts but its a web api reference.
wil smith
DUID is generated from IMEI number. By default, IMEI isn't set for test device. So you won't be able to get it. Looks like in commercial device it will be available.
Ben
Hi wil, thx for your help, good to know it will work on a real device.