Ejemplo n.º 1
0
 public static Notification ios(String alert)
 {
     var iosNotification = new IosNotification().setAlert(alert);
     var notification = new Notification().setAlert(alert);
     notification.IosNotification = iosNotification;
     return notification;
 }
Ejemplo n.º 2
0
 public static Notification android(String alert, String title)
 {
     var platformNotification = new AndroidNotification().setAlert(alert).setTitle(title);
     var notificaiton = new Notification().setAlert(alert);
     notificaiton.AndroidNotification = platformNotification;
     return notificaiton;
 }
Ejemplo n.º 3
0
 public static Notification ios_auto_badge()
 {
     var platformNotification = new IosNotification();
     platformNotification.autoBadge();
     var notificaiton = new Notification().setAlert("");;
     notificaiton.IosNotification = platformNotification;
     return notificaiton;
 }
Ejemplo n.º 4
0
        public static Notification ios_set_badge(int badge)
        {
            var platformNotification = new IosNotification();
            platformNotification.setBadge(badge);

            var notificaiton = new Notification();
            notificaiton.IosNotification = platformNotification;
            return notificaiton;
        }
Ejemplo n.º 5
0
        public PushPayload(Platform platform, Audience audience, Notification notification, Message message = null, Options options = null)
        {
            Debug.Assert(platform != null);
            Debug.Assert(audience != null);
            Debug.Assert(notification != null || message != null);

            this.platform = platform;
            this.audience = audience;
            this.notification = notification;
            this.message = message;
            this.options = options;

            jSetting = new JsonSerializerSettings();
            jSetting.NullValueHandling = NullValueHandling.Ignore;
            jSetting.DefaultValueHandling = DefaultValueHandling.Ignore;
        }
Ejemplo n.º 6
0
        public static Notification winphone(String alert)
        {
            var platformNotification = new WinphoneNotification().setAlert(alert);

            var notificaiton = new Notification().setAlert(alert);
            notificaiton.WinphoneNotification = platformNotification;
            return notificaiton;
        }