Package com.dbay.apns4j

Examples of com.dbay.apns4j.IApnsService.sendNotification()


    // set sound null, the music won't be played
//    payload.setSound(null);
    payload.setSound("msg.mp3");
    payload.addParam("uid", 123456);
    payload.addParam("type", 12);
    service.sendNotification(token, payload);
   
    // payload, use loc string
    Payload payload2 = new Payload();
    payload2.setBadge(1);
    payload2.setAlertLocKey("GAME_PLAY_REQUEST_FORMAT");
View Full Code Here


    // payload, use loc string
    Payload payload2 = new Payload();
    payload2.setBadge(1);
    payload2.setAlertLocKey("GAME_PLAY_REQUEST_FORMAT");
    payload2.setAlertLocArgs(new String[]{"Jenna", "Frank"});
    service.sendNotification(token, payload2);
   
    // get feedback
    List<Feedback> list = service.getFeedbacks();
    if (list != null && list.size() > 0) {
      for (Feedback feedback : list) {
View Full Code Here

  }
  public void resend(String name, Queue<PushNotification> queue) {
    IApnsService service = ApnsServiceImpl.getCachedService(name);
    if (service != null) {
      while (!queue.isEmpty()) {
        service.sendNotification(queue.poll());
      }
    } else {
      logger.error("Cached service is null. name: " + name);
    }
  }
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.