Device.getDeviceSerial()

Overview

Gets the device's serial number. Devices running Android 10 or newer will not return a serial number. Devices running Windows will the return the system SKU. Not supported on iOS.

For a unique device identifier, consider using Device.getVelocityId() instead.

Added in version 2.0.0

Format

var serial = Device.getDeviceSerial();

Parameter Description Type Required Notes
serial A string containing the device's serial number. String Return value May return undefined or null if unable to determine value.

Example

Copy
/* Display a toast message of the device's serial.
*/
var serial = Device.getDeviceSerial();
if(serial) {
    View.toast('Serial: ' + serial, true);
}