On Android, we have null for the device.id key.
"device": {
"id": null,
"manufacturer": "Google",
"model": "Pixel 3",
"name": "blueline",
"type": "android"
},
I've tracked it down to the collectDeviceId key which is read in the Java implement of getContextInfo but not passed in the call on the JavaScript side:
|
contextInfo.putString("deviceId", getUniqueId(config.hasKey("collectDeviceId") && config.getBoolean("collectDeviceId"))) |
|
}: NativeContextInfo = await AnalyticsReactNative.getContextInfo({}); |
2 questions:
- Why do we need to add a condition to get the
deviceId?
- If the condition is necessary, why
getContextInfo is not passing the key accordingly?
On Android, we have
nullfor thedevice.idkey.I've tracked it down to the
collectDeviceIdkey which is read in the Java implement ofgetContextInfobut not passed in the call on the JavaScript side:analytics-react-native/packages/core/android/src/main/java/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.kt
Line 101 in 829fc80
analytics-react-native/packages/core/src/context.ts
Line 34 in 829fc80
2 questions:
deviceId?getContextInfois not passing the key accordingly?