Handling Channel Errors

When a channel error occurs, the NotificationChannelErrorEventArgs.ErrorType property can be used to determine the nature of the error, as the following excerpt demonstrates:

void HandleChannelErrorOccurred(    object sender, NotificationChannelErrorEventArgs e){    switch (e.ErrorType)    {        case ChannelErrorType.ChannelOpenFailed:            // ...            break;        case ChannelErrorType.MessageBadContent:            // ...            break;        case ChannelErrorType.NotificationRateTooHigh:            // ...            break;        case ChannelErrorType.PayloadFormatError:            // ...            break;        case ChannelErrorType.PowerLevelChanged:            // ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.