コード例 #1
0
        public async override Task ReceiveNotificationAsync(IBandClient bandClient, Notification notification)
        {
            PageData messagePageData;

            if (notification.Kind == NotificationKind.CustomMessage)
            {
                messagePageData = new PageData(notification.Id,
                   CustomMessageLayoutIndex,
                   new WrappedTextBlockData(PageElementKind.CustomMessageText, notification.Message));
            }
            else
            {
                messagePageData = new PageData(notification.Id,
                   CustomMessageWithButtonLayoutIndex,
                   new WrappedTextBlockData(PageElementKind.CustomMessageText2, notification.Message),
                   new TextButtonData(PageElementKind.CustomMessageButton, "Acknowledge"));
            }

            await bandClient.TileManager.SetPagesAsync(Id, messagePageData);

            await bandClient.NotificationManager.VibrateAsync(VibrationType.TwoToneHigh);
        }
コード例 #2
0
 public async override Task ReceiveNotificationAsync(IBandClient bandClient, Notification notification)
 {
     var messageFlags = notification.ShowDialog ? MessageFlags.ShowDialog : MessageFlags.None;
     await bandClient.NotificationManager.SendMessageAsync(Id, notification.Title, notification.Message, DateTimeOffset.Now, messageFlags);
     await bandClient.NotificationManager.VibrateAsync(VibrationType.ThreeToneHigh);
 }
コード例 #3
0
 public virtual async Task ReceiveNotificationAsync(IBandClient bandClient, Notification notification)
 { }