Is there a quick way to ID the phone?

Hi,

Is there a way for the SDK to identify the phone - say the IMEI number or something similar?

A session ID or token of some sort may work but I would guess this may change over time/sessions?

I would be looking to set an element in the model to this ID - and have it saved back to the server.

Alternatively, if  that isn't possible, when a user logs on, and no 'local' ID exists, could either the server or phone app create an ID and have it saved locally - and have it persist until some kind of intervention (rather than time out etc)?

Thanks

  • Hi Steve Cox

    Our mobile app has Device - Apache Cordova  plugin installed out of the box

    This means you can use window.device.uuid property to access your device UUID. I guess you can attach it to your models/requests as it fits for you to identify the devices?

    I hope this helps

    Best regards, Eugene

  • Thanks - I had a play with that and the cordova Sim plugin but it always came back as 'undefined'. I guess because I'm developing on a computer using the sdk node instance ( http://localhost:9000/app  ) and it needs a proper device to get those properties.

    I've used the alternative of creating a psuedo-unique ID by fetching unixtime when the app is first run and pushing that into the 'settingsManager.Stores.SETTINGS' to retain it for that instance. I'll try with 'window.device.uuid' and if that's undefined, fall back to the above (hopefully that'll cover real/emulated devices and dev instances too).

    Steve

  • Steve Cox yes, this could be simulator issue

    However when I've tried it on iPhone simulator provided by XCode it device.uuid worked fine for me

  • I was testing via http://localhost:9000/app just through a chome browser (with devtools). That probably explains it.

    Thanks for the help, it worked with a proper device,