I am trying to use device.uuid of Cordova on my Sapui5 application but it's doesn't seems to be working. I am running my app on Sap fiori client app. Other fuctinalities of Cordova such as barcode scanner etc. works fine but when I tried to use device.uuid I am having error. I don't know what is the exact error because I am not able to debug sap fiori client app and app log doesn't show reason of it. What I know is when I write a code like below;
var a = device.uuid;
Application stops when executes this line. This problem does not occur on Local sap ide or sap web ide full stack. Device.uuid is null but doesn't cause error except sap fiori cliemt app.
Does anyone have a idea why that might be?
Thank you, Best regards.
It's possible that either the device.ready() event hasn't fired, or that the cordova-plugin-device plugin isn't installed / referenced properly (see https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/ for more info).
You might be able to test for a null device object before setting your variable to the uuid property: