8000 GitHub - swallowcc/apns4j: Apple Push Notification Service Implement with Java
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

swallowcc/apns4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apns4j

Apple Push Notification Service Implement with Java

How to use?



        <dependency>
            <groupId>com.github.teaey</groupId>
            <artifactId>apns4j</artifactId>
            <version>1.0.1</version>
        </dependency>


@see TestSample



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


About

Apple Push Notification Service Implement with Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%
0