Obtaining your device ID

Details on how to identify your device ID for testing purposes

Whenever you are performing test sends for not profile-based channels channels such as web push, mobile push, inbox, onsite / in-app messages, identifying the device ID is necessary. You'll find details on how to identify your device ID in the different environments.

Web based channels

For web based channels (web push, web inbox, onsite messages), you can easily obtain the device ID from the developer tools of your browser of choice (Chrome, Firefox or Safari). Open it by pressing Option+Command+I (⌥⌘ I) on Mac or F12 or Control+Shift+I for Windows. Navigate to the JavaScript Console tab. Use the following SDK method to obtain your device ID:

xtremepush('get','device_info');

The system will return the device id as id (not the entry named device_id).

Obtaining the device ID from the JavaScript console (in the example, the device ID is 1126314414).Obtaining the device ID from the JavaScript console (in the example, the device ID is 1126314414).

Obtaining the device ID from the JavaScript console (in the example, the device ID is 1126314414).

Mobile based channels

For mobile based channels (mobile push, mobile inbox, in-app messages), obtaining the device ID will be easy in your stage apps. You can do so by calling the following:

mPushConnector.getDeviceInfo(this).get("XPushDeviceID");
//This will return the Xtremepush device ID as a string.
XPush.deviceInfo[@"deviceID"]
XPush.deviceInfo["deviceID"]

You can also find your device ID in the SDK debug logs.

In your production app, you will need to identify your device ID from the user interface, narrowing down the results through the different data points that our mobile SDKs collect.

iOS apps

Unless you have turned off the collection of the iOS device name in production, the easiest way for iOS app users to identify a device ID would be by the device's name.

Recommended steps:

  1. Open your iOS app on your device.
  2. Change your iOS device name to something that's unique from Settings > General > About > Name.
  3. Close your iOS app on your device.
  4. Reopen your iOS app, to make sure that the new name is communicated to Xtremepush.
  5. Navigate to Data > Devices and use the Name field to search by your device's name.

👍

Can't see the Name field?

The devices page has several searchable fields that can be enabled or disabled. Move all the way to the right and click on the gear icon to enable the Name field in your project.

Android apps

You can use our segmentation engine (by selecting the conditions Device info, Location and Attributes) to identify your device.

Some of the data points that you can use are:

  • Device model
  • Operating system (OS version)
  • Carrier
  • Language
  • Country

Use a combination of these to narrow down the results.

Segmenting by device ID

Once that you have identified your device ID, you'll be able to include it by using the segmentation engine (from Audiences or directly from the segmentation within the campaign).

Example of a web push campaign addressed to test device.Example of a web push campaign addressed to test device.

Example of a web push campaign addressed to test device.

👍

Best practices

Click on Calculate before launching the campaign and make sure that the recipient count is higher than 0 and matches what you expect.

Updated 2 months ago


Obtaining your device ID


Details on how to identify your device ID for testing purposes

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.