How to find the channel ID using the channel capture tool - draft

Overview

Airship uses unique channel IDs to identify specific devices on your app. These channel IDs are often the most important piece of information that you will need to track push delivery to a specific device.

To help find your channel ID, our SDK contains a built-in tool called the channel capture tool (Android | iOS). This document will walk you through using the channel capture tool to get the channel ID of your device.

Instructions

SDK 14.0.0 and above
SDK 6.1 - 13.3.5 (Android)/13.5.6 (iOS)
Android SDK Versions 8.3-8.3.2

SDK 14.0.0 and above

If you're on Airship SDK 14.0.0 or above, you can get your channel ID by opening the app and going back to your device's home screen 6 times in a row. On the 6th app open, the channel ID will be copied to your clipboard with an expiry of 1 minute.

Your clipboard content, when pasted, will look similar to the below example:

ua:9c36e8c7-5a73-47c0-9716-99fd3d4197d5

Everything after the ua: is the channel ID of the device.

 

SDK 6.1 - 13.3.5 (Android)/13.5.6 (iOS)

Reach out to support@airship.com and request a channel capture token (a long string of letters and numbers that can be used to get the channel ID for any Android or iOS device on a single App Key).

The token you receive will look similar to the below example:

MTcxMTBlM2UwZTI0MzMyOTA3NmMyNjEzMzB4TDA4MzQxBDYyNjE2MzJmMTA
Each Airship project has its own channel capture token, so you will want to include the App Key of each Airship project you want a token for in your request.

After receiving the channel capture token, take the following steps:

  1. Open the Settings menu on your device.
  2. Scroll down until you find your application listed and tap on it to select.
  3. Turn off Background App Refresh (this step may only be applicable to iOS).
  4. Turn off or Block push notifications for the application.
  5. Send the channel token to the device, such as by email or SMS text message.
  6. Open the message on your device and long press on the token to copy into your device's clipboard. Be sure to copy the full token and nothing else such as punctuation or white space.
  7. Open your application on your device.
  8. A pop-up should appear on your screen which shows your Channel ID with options to copy or share.
  9. Remember to unblock notifications once you retrieve your Channel ID

Troubleshooting

General
iOS
Android

General

Make sure the channel capture tool is enabled in your app's code. (Android | iOS)

iOS

If you are on an iOS device, triple-check that Background App Refresh has been disabled before copying the channel capture token and opening your app:

backgroundrefreshoff.png

Android

If you are on an Android device and your application has a loading screen, the loading screen may be covering the channel ID when it appears on the screen. If that's the case, you can try using one of the alternate methods linked below to get the channel ID of your device:

If you are on Android SDK versions 8.3-8.3.2, you will need to follow the instructions below:

Android SDK Versions 8.3-8.3.2

Unlike with other SDK versions, channel capture can only be enabled by sending a specific silent push.

Sending a silent push is usually transparent to your end users, however some applications may implement code which is triggered when a push is received. Consult with your development team if you have a concern prior to sending a push. If you do not regularly target your entire audience for a push notification, you may see an increase in uninstalled devices. Consult our guide on Detecting Uninstalled Devices for an explanation of why this would be expected.
  1. Retrieve your app key and master secret which will be needed to send a notification (Keep this secure)
  2. Copy the following cURL request, which will send a silent push to your audience and enable the Channel Capture Tool for the number of seconds specified in the channel_capture_action.
    You will replace the text in the '-u' line with your actual app key and master secret
    curl -X POST \
    https://go.urbanairship.com/api/push \
    -H 'accept: application/vnd.urbanairship+json; version=3;' \
    -u 'REPLACE-WITH-APP-KEY:REPLACE-WITH-MASTER-SECRET' \
    -H 'cache-control: no-cache' \
    -H 'content-type: application/json' \
    -d '{
             "audience": "all",
             "notification": {
                 "ios": {
                     "content_available": 1
                 },
                 "android": {
    
                 },
                 "actions": {
                     "app_defined": {
                         "channel_capture_action": 180
                     }
                 }
             },
             "device_types": ["ios","android"]
         }'
  3. Follow the above instructions to copy the channel capture token into the device clipboard and open the app to reveal the channel ID

Related Content

 

Was this article helpful?
0 out of 0 found this helpful
Submit a request