JavaPNS初级使用,关于Push工具类的使用
首先的Push里简单的
alert、badge、sound和combined就不过多的介绍了
就是推送简单的提示和声音,以及组合等推送。
重点介绍推送有数据内容的部分
payload有两种方法
其内部调用的内容不相同
其中一个是单线程的推送
通过PushNotificationManager发送推送
public static PushQueue queue(Object keystore, String password, boolean production, int numberOfThreads) throws KeystoreException {AppleNotificationServer server = new AppleNotificationServerBasicImpl(keystore, password, production);PushQueue queue = numberOfThreads <= 1 ? new NotificationThread(server) : new NotificationThreads(server, numberOfThreads);return queue;}