/* * Submit default notification */ public void SendDefaultNotification(DigitalCity.Model.Notification notification) { var title = notification.title; var content = notification.content; var id = notification.GetId(); Notification.Builder builder = CreateNotificationBuilder(title, content); PublishNotification(builder, id); }
/* * Submit default notification */ public void SendDefaultNotification(DigitalCity.Model.Notification notification) { var title = notification.title; var content = notification.content; var image = notification.imagePath; var id = notification.GetId(); var UNcontent = CreateContent(title, content); PublishNotification(id, UNcontent); }
/* * Submit notification with a small icon on the very right */ public void SendCollapsedNotification(DigitalCity.Model.Notification notification) { var title = notification.title; var content = notification.content; var image = notification.imagePath; var id = notification.GetId(); var UNContent = CreateContent(title, content); UNContent = AddImageAttachment(UNContent, image); PublishNotification(id, UNContent); }
/* * Submit user-interactive notification (not finished) */ public void SendExpandedNotification(DigitalCity.Model.Notification notification) { var title = notification.title; var content = notification.content; var image = notification.imagePath; var id = notification.GetId(); Notification.Builder builder = CreateNotificationBuilder(title, content); int imageID = (int)typeof(Resource.Drawable).GetField(image).GetRawConstantValue(); builder.SetStyle(new Notification.BigPictureStyle().BigPicture(BitmapFactory.DecodeResource(CrossCurrentActivity.Current.Activity.Resources, imageID))); PublishNotification(builder, id); }
/* * Submit notification with a small icon on the very right */ public void SendCollapsedNotification(DigitalCity.Model.Notification notification) { var title = notification.title; var content = notification.content; var image = notification.imagePath; var id = notification.GetId(); //create builder and assign image to the notification Notification.Builder builder = CreateNotificationBuilder(title, content); int imageID = (int)typeof(Resource.Drawable).GetField(image).GetRawConstantValue(); builder.SetLargeIcon(BitmapFactory.DecodeResource(CrossCurrentActivity.Current.Activity.Resources, imageID)); PublishNotification(builder, id); }