Skip to content

device.id is null on Android #397

@Kerumen

Description

@Kerumen

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions