我使用 Java pns 来推送我的应用程序, 这就是我的使用方式:
public static PushedNotifications Push(String token,String message,String Sound,int badge) throws CommunicationException, KeystoreException{
String key=PushUtil.class.getResource("cert.p12").getPath();
PushedNotifications pn= Push.combined(message, badge, Sound, key, "Pass", true, token);
System.out.println("pn: "+pn);
return pn;
}
有没有办法发送通知,其中包含增加徽章的金额而不是 只是设置一下吗?
最佳答案
据我所知。徽章号码只是一个替代品。如果它要反射(reflect)某种状态,您应该在服务器中维护该状态,并始终推送绝对值。
关于java - 增加 iPhone 应用程序上的应用程序徽章数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11760936/