帮酷LOGO
  • 显示原文与译文双语对照的内容
Apple Push Notification Service Implement with Java(java apns)

  • 源代码名称:apns4j
  • 源代码网址:http://www.github.com/teaey/apns4j
  • apns4j源代码文档
  • apns4j源代码下载
  • Git URL:
    git://www.github.com/teaey/apns4j.git
  • Git Clone代码到本地:
    git clone http://www.github.com/teaey/apns4j
  • Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/teaey/apns4j
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
  • Apns4j

    LicenseBuild Status

    快速启动

    <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();
    版本控制
    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.



    Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语