public static Task UnregisterNotificationTaskAsync(this IBandNotificationManager manager)
        {
            var tcs = new TaskCompletionSource <object> ();

            manager.UnregisterNotificationAsync(tcs.AttachCompletionHandler());
            return(tcs.Task);
        }
        public static Task VibrateTaskAsync(this IBandNotificationManager manager, VibrationType vibrationType)
        {
            var tcs = new TaskCompletionSource <object> ();

            manager.VibrateAsync(vibrationType, tcs.AttachCompletionHandler());
            return(tcs.Task);
        }
        public static Task SendMessageTaskAsync(this IBandNotificationManager manager, NSUuid tileID, string title, string body, NSDate timeStamp, MessageFlags flags)
        {
            var tcs = new TaskCompletionSource <object> ();

            manager.SendMessageAsync(tileID, title, body, timeStamp, flags, tcs.AttachCompletionHandler());
            return(tcs.Task);
        }
        public static Task ShowDialogTaskAsync(this IBandNotificationManager manager, NSUuid tileID, string title, string body)
        {
            var tcs = new TaskCompletionSource <object> ();

            manager.ShowDialogAsync(tileID, title, body, tcs.AttachCompletionHandler());
            return(tcs.Task);
        }
Esempio n. 5
0
        public static Task RegisterPushNotificationTaskAsync(this IBandNotificationManager manager, NSUuid tileID)
        {
            var tcs = new TaskCompletionSource <object> ();

            manager.RegisterPushNotificationAsync(tileID, tcs.AttachCompletionHandler());
            return(tcs.Task);
        }
Esempio n. 6
0
 public static Task SendMessageTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body, Java.Util.Date date, MessageFlags flags)
 {
     return(manager.SendMessageAsync(tileId, title, body, date, flags).AsTask());
 }
Esempio n. 7
0
 public static Task VibrateTaskAsync(this IBandNotificationManager manager, VibrationType type)
 {
     return(manager.VibrateAsync(type).AsTask());
 }
Esempio n. 8
0
 public static Task ShowDialogTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body)
 {
     return(manager.ShowDialogAsync(tileId, title, body).AsTask());
 }
Esempio n. 9
0
 public static Task SendMessageTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body, DateTime date)
 {
     return(manager.SendMessageTaskAsync(tileId, title, body, date, false));
 }
Esempio n. 10
0
 public static Task SendMessageTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body, DateTime date, bool showDialog)
 {
     return(manager.SendMessageTaskAsync(tileId, title, body, date, showDialog ? MessageFlags.ShowDialog : MessageFlags.None));
 }
Esempio n. 11
0
        public static Task SendMessageTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body, DateTime date, MessageFlags flags)
        {
            var javaDate = new Java.Util.Date(date.Year, date.Month, date.Day, date.Hour, date.Minute, date.Second);

            return(manager.SendMessageTaskAsync(tileId, title, body, javaDate, flags));
        }
 public static Task SendMessageTaskAsync(this IBandNotificationManager manager, NSUuid tileID, string title, string body, DateTime timeStamp)
 {
     return(manager.SendMessageTaskAsync(tileID, title, body, (NSDate)timeStamp));
 }
 public static Task SendMessageTaskAsync(this IBandNotificationManager manager, NSUuid tileID, string title, string body, NSDate timeStamp, bool showDialog)
 {
     return(manager.SendMessageTaskAsync(tileID, title, body, timeStamp, showDialog ? MessageFlags.ShowDialog : MessageFlags.None));
 }
Esempio n. 14
0
 public static Task SendMessageTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body, DateTime date, MessageFlags flags)
 {
     return(manager.SendMessageTaskAsync(tileId, title, body, new Java.Util.Date(date.Year, date.Month, date.Day), flags));
 }
        public static Task SendMessageTaskAsync(this IBandNotificationManager manager, Java.Util.UUID tileId, string title, string body, DateTime date, MessageFlags flags)
        {
            var javaDate = new Java.Util.Date((long)(date.ToUniversalTime() - JavaEpoch).TotalMilliseconds);

            return(manager.SendMessageTaskAsync(tileId, title, body, javaDate, flags));
        }