public interface INotificationManager { Task SendNotification(string message); } public class NotificationManager : INotificationManager { public async Task SendNotification(string message) { try { var hub = NotificationHubClient.CreateClientFromConnectionString(Constants.NotificationAccessKey, Constants.NotificationHubName); // Send the notification var result = await hub.SendAppleNativeNotificationAsync("{\"aps\":{\"alert\":\"" + message + "\", \"title\":\"" + message + "\", \"sound\":\"bingbong.aiff\"}}"); return true; } catch (Exception) { return false; } } }