getDeviceId

❗️

Deprecated

This method is no longer recommended. Audience Manager is no longer available in the latest product version, and the SDK forwards the device ID only on Audience Manager requests.

The getDeviceId() method returns the device ID currently set on the tracker.

Syntax

tracker.deviceId
getTracker().getDeviceId();

Returns

The device ID previously set with setDeviceId(), or null if none has been set.

Type: String

Examples

To get the device ID:

tracker.deviceId
getTracker().getDeviceId();

Related methods