Skip to content
/ apns4j Public

Apple Push Notification Service Implement with Java(java apns)

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt
Notifications You must be signed in to change notification settings

teaey/apns4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apns4j

License Build Status

Quick start

<dependency>
    <groupId>cn.teaey.apns4j</groupId>
    <artifactId>apns4j</artifactId>
    <version>1.1.4</version>
</dependency>
//Step 1
ApnsChannelFactory apnsChannelFactory = Apns4j.newChannelFactoryBuilder()
.keyStoreMeta("${path to your keystore}")
.keyStorePwd("${keystore password}")
.build();

//Setp 2
ApnsChannel apnsChannel = apnsChannelFactory.newChannel();

//Step 3 create & init notify payload
ApnsPayload apnsPayload = Apns4j.newPayload()
        .alertTitle("Title")
        .alertBody("Pushed by apns4j")
        .sound("default");

//Step 4 send via channel
apnsChannel.send("${target device token}", apnsPayload);

//Step 5 in the end, apnsChannel can be Recycle and Reuse
apnsChannel.close();

Version Control

This project uses Semantic Versioning. Version format is X.Y.Z:

X: New program version.

Y: New feature or huge bug fix patch.

Z: Minor fix or patch.

捐赠

donate

About

Apple Push Notification Service Implement with Java(java apns)

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages