Channels for the Unity Plugin

Access and manage channel IDs and listen for channel creation.

Each device/app install will generate a unique identifier known as the Channel ID. Once a Channel ID is created, it will persist in the application until the app is reinstalled, or has its internal data is cleared.

For information about finding Channel IDs, using the Channel Capture tool, and other methods to access Channel IDs, see Finding Channel IDs.

Accessing the Airship Channel ID

Apps can access the Channel ID directly through the SDK.

string channelId = UAirship.Shared.ChannelId;

The Channel ID is asynchronously created, so it may not be available right away on the first run. Changes to Channel data will automatically be batched and applied when the Channel is created, so there is no need to wait for the Channel to be available before modifying any data.

Applications that need to access the Channel ID can use a listener to be notified when it is available.

UAirship.Shared.OnChannelUpdated += (string channelId) => {
    Debug.Log ("Channel updated: " + channelId);
};