From b61a8633bbc36a1e4c43873fc99d824a0e662738 Mon Sep 17 00:00:00 2001 From: teaey Date: Fri, 30 Sep 2016 09:34:57 +0800 Subject: [PATCH] readme --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 84dbaa0..062e4ad 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,51 @@ +[Quick start](https://github.com/teaey/apns4j/wiki) +--- +``` + + cn.teaey.apns4j + apns4j + 1.1.0 + -Apple Push Notification Service Implement with Java ---- +//Step 1 +ApnsChannelFactory apnsChannelFactory = Apns4j.newChannelFactoryBuilder() +.keyStoreMeta("${path to your keystore}") +.keyStormPwd("${keystore password}") +.build(); -[APNS](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html) +//Setp 2 +ApnsChannel apnsChannel = apnsChannelFactory.newChannel(); -[Quick start](https://github.com/teaey/apns4j/wiki) +//Step 3 create & init notify payload +ApnsPayload apnsPayload = Apns4j.newPayload() + .alertActionLocKey("FixMe") + .alertTitle("Title") + .alertBody("Pushed by apns4j") + .sound("default"); + +//Step 4 send via channel +apnsChannel.send(TestConts.deviceToken, 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. +``` +