Java APNS开源库 apns4j

码农软件 · 软件分类 · 网络工具包 · 2019-02-26 07:28:35

软件介绍

apns4j 是 Apple Push Notification Service 的 Java 实现!

Maven:

<dependency>    
    <groupId>com.github.teaey</groupId>    
    <artifactId>apns4j</artifactId>    
    <version>1.0.1</version>    
</dependency>

示例代码:

KeyStoreWraper keyStore = KeyStoreHelper.getKeyStoreWraper("XXXXXXXX.p12", keyStorePasswd);    
AppleNotificationServer appleNotificationServer = new AppleNotificationServer(AppleGateway.ENV_DEVELOPMENT, keyStore);    
SecurityConnectionFactory connectionFactory = new SecurityConnectionFactory(appleNotificationServer);    
SecurityConnection connection = connectionFactory.getSecurityConnection();    
    
NotifyPayload notifyPayload = new NotifyPayload();    
//notifyPayload.setAlert("TEST1");    
notifyPayload.setBadge(2);    
notifyPayload.setSound("default");    
notifyPayload.setAlertBody("Pushed By apns4j");    
notifyPayload.setAlertActionLocKey("Button Text");    
connection.writeAndFlush(deviceTokenString, notifyPayload);    
connection.close();

本文地址:https://codercto.com/soft/d/150.html

暗时间

暗时间

刘未鹏 / 电子工业出版社 / 2011-7 / 35.00元

2003年,刘未鹏在杂志上发表了自己的第一篇文章,并开始写博客。最初的博客较短,也较琐碎,并夹杂着一些翻译的文章。后来渐渐开始有了一些自己的心得和看法。总体上在这8年里,作者平均每个月写1篇博客或更少,但从未停止。 刘未鹏说—— 写博客这件事情给我最大的体会就是,一件事情如果你能够坚持做8年,那么不管效率和频率多低,最终总能取得一些很可观的收益。而另一个体会就是,一件事情只要你坚持得足......一起来看看 《暗时间》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具