Retrieves the unique device identifier.
Syntax
Future<String?> getDeviceId()
Returns
Future<String?>- Returns the device ID as a string, ornullif no device ID is available.
Example
String? deviceId = await SfmcSdk.getDeviceId();
if (deviceId != null) {
print('Device ID: $deviceId');
} else {
print('No device ID available');
}
Notes
- The device ID is used internally by the SDK to identify the device.
- This ID may be different from the system push token.