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://www.codercto.com/soft/d/150.html

Web软件用户界面设计指南

Web软件用户界面设计指南

林锐、唐勇、石志强 / 电子工业出版社 / 2005-5-1 / 20.00元

Web软件用户界面设计指南,ISBN:9787121010163,作者:林锐等编著一起来看看 《Web软件用户界面设计指南》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具