apns4j Java APNS开源库

程序名称:apns4j

授权协议: Apache

操作系统: 跨平台

开发语言: Java

apns4j 介绍

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();

apns4j 官网

https://github.com/teaey/apns4j

相关编程语言

BlazeDS 是一个基于服务器的Java 远程控制(remoting...
OVal 是一个可扩展的Java对象数据验证框架,验证的规...
Volta 是一套开发工具,专为开发分布式、实时系统应...
OpenDDS 是一个开源的 C++ 实现的 对象管理组织 OMG...
JADE (Java Agent DEvelopment Framework) 是一个完...
FastMM ,在D2006和2007中已代替了原来的内存管理器。