189
Views
3
Comments
Solved
[Get Device Information] DeviceUUID is getting empty string
Question
get-device-information
Mobile icon
Forge asset by assif_tiger

Hello. The DeviceUUID is returning empty on my device.


2021-04-09 11-42-43
assif_tiger
 
MVP
Solution

Tiago Reis wrote:

Hello. The DeviceUUID is returning empty on my device.


Can you mention the Device manufacture & Platform, so that we can check.
But overall it's an JS API:


You can refer below JS to get the Device Information as an alternative to the component:

if (cordova) {

    $public.Device.whenReady().then(function() {     $parameters.DeviceModel = device.model;     $parameters.Platform = device.platform;     $parameters.UUID = device.uuid;     $parameters.Version = device.version;     $parameters.Manufacturer = device.manufacturer;     $parameters.IsSimulator = device.isVirtual;     $parameters.SerialNumber = device.serial;     $resolve();     }); } else {   // fallback when testing on desktop browser   $resolve(); }


- Create a JS Action & return Output params like this:

2018-05-11 10-51-15
Tiago Reis

The second time I run it worked. I don't know what happened but now its working.

2021-04-09 11-42-43
assif_tiger
 
MVP

Happy to know it worked,

May be you added the component & you might be testing the same on OLD build.

Remember in-case you use any component, you should generate a new build & install it again on device.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.