Closed GoogleCodeExporter closed 8 years ago
public static void main(String[] args) throws Exception { String deviceToken = "9468d0d9816340b3ef508024af6232beb39d12d13eb95c127adc240d50ada561"; String alert = "我的push测试111111111111";//push的内容 int badge = 100;//图标小红圈的数值 // String sound = "default";//铃音 List<Device> devices = new ArrayList<Device>(); for(int i=0;i<500;i++){ if(i==57||i==70){ devices.add(new BasicDevice("1111000000000000000000000000000000000011111111111111110000"+(100000+i))); }else if(i%2==0){ devices.add(new BasicDevice("9468d0d9816340b3ef508024af6232beb39d12d13eb95c127adc240d50ada561")); }else{ devices.add(new BasicDevice("6a6e374bc0c01eb5d8719589f6946157803a1b84b85af2259a60643842b3da0a")); } } String keystore = "D:/pushTest.p12"; String password = "123456";//此处注意导出的证书密码不能为空因为空密码会报错 boolean sendCount = false; try { long start = System.currentTimeMillis(); PushNotificationPayload payLoad = new PushNotificationPayload(); payLoad.addAlert(alert); // 消息内容 payLoad.addBadge(badge); // iphone应用图标上小红圈上的数值 List<PushedNotification> notifications = Push.payload(payLoad, keystore, password, true, 30, devices); NotificationTest.printPushedNotifications(notifications); long end = System.currentTimeMillis(); System.out.println(end - start); } catch (Exception e) { e.printStackTrace(); } }
Original issue reported on code.google.com by zha...@gmail.com on 25 Jun 2013 at 8:50
zha...@gmail.com
Closing 1-year-old issue.
Original comment by sype...@gmail.com on 30 Sep 2014 at 4:02
sype...@gmail.com
Original issue reported on code.google.com by
zha...@gmail.com
on 25 Jun 2013 at 8:50