예제 #1
0
        public void sendRefresh(int peopleID, int type)
        {
            GCMData    data = new GCMData(type, ACTION_REFRESH, 0, "", "");
            GCMMessage msg  = new GCMMessage(peopleID, null, data, null, _host, _dataContext);

            send(msg);
        }
예제 #2
0
파일: GCMHelper.cs 프로젝트: vanutama/bvcms
 public static void sendNotification(int peopleID, int type, int id, string title, string message)
 {
     GCMPayload notification = new GCMPayload(title, message);
     GCMData data = new GCMData(type, ACTION_REFRESH_AND_NOTIFY, id, title, message);
     GCMMessage msg = new GCMMessage(peopleID, null, data, notification);
     send(msg);
 }
예제 #3
0
파일: GCMHelper.cs 프로젝트: vanutama/bvcms
        public static void sendRefresh(List<int> peopleIDs, int type)
        {
            if (peopleIDs.Count == 0) return;

            GCMData data = new GCMData(type, ACTION_REFRESH, 0, "", "");
            GCMMessage msg = new GCMMessage(peopleIDs, null, data, null);
            send(msg);
        }
예제 #4
0
        public void sendNotification(int peopleID, int type, int id, string title, string message)
        {
            GCMPayload notification = new GCMPayload(title, message);
            GCMData    data         = new GCMData(type, ACTION_REFRESH_AND_NOTIFY, id, title, message);
            GCMMessage msg          = new GCMMessage(peopleID, null, data, notification, _host, _dataContext);

            send(msg);
        }
예제 #5
0
파일: GCMHelper.cs 프로젝트: vanutama/bvcms
        public static void sendNotification(List<int> peopleIDs, int type, int id, string title, string message)
        {
            if (peopleIDs.Count == 0) return;

            GCMPayload notification = new GCMPayload(title, message);
            GCMData data = new GCMData(type, ACTION_REFRESH_AND_NOTIFY, id, title, message);
            GCMMessage msg = new GCMMessage(peopleIDs, null, data, notification);
            send(msg);
        }
예제 #6
0
        public void sendRefresh(List <int> peopleIDs, int type)
        {
            if (peopleIDs.Count == 0)
            {
                return;
            }

            GCMData    data = new GCMData(type, ACTION_REFRESH, 0, "", "");
            GCMMessage msg  = new GCMMessage(peopleIDs, null, data, null, _host, _dataContext);

            send(msg);
        }
예제 #7
0
        public void sendNotification(List <int> peopleIDs, int type, int id, string title, string message)
        {
            if (peopleIDs.Count == 0)
            {
                return;
            }

            GCMPayload notification = new GCMPayload(title, message);
            GCMData    data         = new GCMData(type, ACTION_REFRESH_AND_NOTIFY, id, title, message);
            GCMMessage msg          = new GCMMessage(peopleIDs, null, data, notification, _host, _dataContext);

            send(msg);
        }
예제 #8
0
        public GCMMessage(int peopleID, string exclude, GCMData data, GCMPayload notification)
        {
            this.data         = data;
            this.notification = notification;

            this.registration_ids = (from r in DbUtil.Db.MobileAppPushRegistrations
                                     where r.PeopleId == peopleID
                                     select r.RegistrationId).ToList();

            if (exclude != null && exclude.Length > 0)
            {
                this.registration_ids.Remove(exclude);
            }
        }
예제 #9
0
        public GCMMessage(int peopleID, string exclude, GCMData data, GCMPayload notification)
        {
            this.data = data;
            this.notification = notification;

            this.registration_ids = (from r in DbUtil.Db.MobileAppPushRegistrations
                                     where r.PeopleId == peopleID
                                     select r.RegistrationId).ToList();

            if (exclude != null && exclude.Length > 0)
            {
                this.registration_ids.Remove(exclude);
            }
        }
예제 #10
0
        public GCMMessage(List <int> peopleIDs, string exclude, GCMData data, GCMPayload notification)
        {
            if (!Util.Host.HasValue())
            {
                return;
            }
            this.data         = data;
            this.notification = notification;

            this.registration_ids = (from r in DbUtil.Db.MobileAppPushRegistrations
                                     where peopleIDs.Contains(r.PeopleId)
                                     select r.RegistrationId).ToList();

            if (exclude != null && exclude.Length > 0)
            {
                this.registration_ids.Remove(exclude);
            }
        }
예제 #11
0
        public GCMMessage(int peopleID, string exclude, GCMData data, GCMPayload notification, string host, CMSDataContext dataContext)
        {
            _host        = host;
            _dataContext = dataContext;

            if (!_host.HasValue())
            {
                return;
            }

            this.data         = data;
            this.notification = notification;

            this.registration_ids = (from r in _dataContext.MobileAppPushRegistrations
                                     where r.PeopleId == peopleID
                                     select r.RegistrationId).ToList();

            if (exclude != null && exclude.Length > 0)
            {
                this.registration_ids.Remove(exclude);
            }
        }
예제 #12
0
 public GCMMessage(List <string> registrationIDs, GCMData data)
 {
     this.registration_ids = registrationIDs;
     this.data             = data;
 }
예제 #13
0
파일: GCMHelper.cs 프로젝트: vanutama/bvcms
 public static void sendRefresh(int peopleID, int type)
 {
     GCMData data = new GCMData(type, ACTION_REFRESH, 0, "", "");
     GCMMessage msg = new GCMMessage(peopleID, null, data, null);
     send(msg);
 }
예제 #14
0
 public GCMMessage(List<string> registrationIDs, GCMData data)
 {
     this.registration_ids = registrationIDs;
     this.data = data;
 }