Ping SDKs

Uniquely identifying devices

The Device Match node looks up a user’s stored device profiles using a device identifier as a key. The Ping SDKs generate the device identifier as part of the device profile that it returns to the Device Profile Collector node as part of the JSON payload.

For example:

{
  "identifier": "d50cdb5ce8d055a3-86bd35e1b975a14d76b40940112c2380264c8efd",
  ....
}
json

Device identifier generation

This section covers the identifiers used on each platform, and how they are generated.

On Android, a static device ID is not possible.

Static device ID

An ID that never changes, even during a factory reset or app re-installation.

Instance ID

An identifier for an instance of an application.

Instead of using a device ID, Android uses an instance ID. The instance ID provides a unique identifier for each instance of app, or app group.

Instance ID generation algorithm:

  1. Generate a public/private key pair, and store the KeyPair in the AndroidKeyStore (Shared Storage).

  2. Hash the public key with SHA1.

  3. Encode with Base64.

  4. Compile the ANDROID_ID with the hashed public key.

When can identifiers change?

If the identifier changes, the Device Match node will be unable to match any stored device profiles.

If this happens, your journey must collect and store a new device profile, which contains the new identifier.

This section explains what can cause an identifier to change on each platform.

In Android, the instance ID is deleted or changes if any of the following occurs:

  • An app is restored on a new device.

  • The user uninstalls and re-installs the app.

  • The user clears app data.