Examples of IPushServer


Examples of com.baasbox.service.push.providers.IPushServer

    }//for (String username : usernames)
    int i=0;
    for(Integer pushProfile : pushProfiles) {
      HashMap<Factory.VendorOS,IPushServer> allVendors= Factory.getAllIstances();

      IPushServer apnServer =  allVendors.get(VendorOS.IOS);
      apnServer.setConfiguration(getPushParameters(pushProfile));

      IPushServer gcmServer =  allVendors.get(VendorOS.ANDROID);
      gcmServer.setConfiguration(getPushParameters(pushProfile));

      if(iosToken.size()>0) {
        for(List<String> thousandUsersApple : Lists.partition(iosToken, 1000)){
          withError[i]=apnServer.send(message, thousandUsersApple, bodyJson);
        }
        i++;
      }

      if(androidToken.size()>0) {
        for(List<String> thousandUsersAndroid: Lists.partition(androidToken,1000)){ //needed for the GCM sending limit
          withError[i]=gcmServer.send(message, thousandUsersAndroid, bodyJson);
        }
        i++;
      }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.