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 live online training, plus books, videos, and digital content from nearly 200 publishers.