How to find the Channel ID using the Channel Capture Tool

We recommend that you send a test message to the app on a test device (or a group of test devices) prior to sending to your desired audience to ensure the message functions and displays as expected.

We may also request a device's Channel ID when tracing the path of a push notification and whether it was received by a device.

To help find your Channel ID our SDK contains a built-in tool for retrieving your Channel ID called the Channel Capture Tool.

Requirements 

* Requires SDK version 6.1+ on iOS or Android

* Channel Capture tool is enabled by default at the application level but there is a flag to disable it in Android and iOS applications. Make sure it has not been disabled.

Steps

  1. First you will want to submit a support ticket or email with the app key for the application you would like the token for and a request for a Channel Capture Token. Each application will have it's own token which will work for all Android and iOS devices on the application.

    If you have production and development versions of the app, each will have its own app key and token. You can include multiple applications in one email.
  2. Once we receive the email we will respond with the Channel Capture token for your app. This will be a long string of letters and numbers such as this example:

    MTcxMTBlM2UwZTI0MzMyOTA3NmMyNjEzMzB4TDA4MzQxBDYyNjE2MzJmMTA
  3. Once you have been provided the token, you will want to send this to your device, such as by email or text. 

  4. 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.

    copy_token.jpg


  5. Open your application on your device.

  6. A pop-up should appear on your screen which shows your Channel ID with options to copy or share.

    channel_showing.jpg

Depending on the version of the Urban Airship SDK which is integrated into your application, there maybe a few extra steps necessary for the Channel Capture Tool to work.


IOS SDK Version 8.5.0 +

Channel Capture Tool's capabilities are disabled by default on the individual device. It can be enabled on the device by doing the following (This is in addition to and will not override the application level flag mentioned in requirements):

  1. Open the Settings menu on the Device.
  2. Scroll down until you find your application listed and tap on it to select

    Screen_Shot_2018-07-06_at_3.37.21_PM.png

  3. Turn Off Background App Refresh

    backgroundrefreshoff.png
  4. Follow above steps to copy the Channel Capture Token into the device clipboard and open the app to reveal the Channel ID
  5. Remember to Turn Background App Refresh back on

Android SDK Version 8.4 + 

Channel Capture Tool's capabilities are disabled by default on the individual device. It can be enabled on the device by doing the following (This is in addition to and will not override the application level flag mentioned in requirements):

  1. Open the Settings menu on the Device.
  2. Go to Apps and Notifications (Maybe just called Applications or Notifications depending on the Android Version and Manufacturer)

    Screen_Shot_2018-07-07_at_11.02.02_AM.png

  3. Find and select your application

    select_app.png

  4. Block/Turn off Push Notifications for the application

    notifications_off.png

  5. Follow above steps to copy the Channel Capture Token into the device clipboard and open the app to reveal the Channel ID

    Screen_Shot_2018-07-07_at_11.08.09_AM.png

  6. Remember to unblock notifications once you retrieve your Channel ID

Android SDK Versions 8.3-8.3.2

The Channel Capture Tool is disabled by default on the individual device. Channel capture can only be enabled by sending a specific silent push (This is in addition to and will not override the application level flag mentioned in requirements).

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, enabling the Channel Capture Tool for a specified amount of seconds 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 above steps to copy the Channel Capture Token into the device clipboard and open the app to reveal the Channel ID

If you are setting up your device for testing purposes you may now add this Channel ID to a Test Group on the application, or you can create a .CSV list of many test devices and upload this list following our Upload List Tutorial.

The Test Group or the Uploaded List can then be targeted as an audience for a push notification for testing.


Related Content