This project is an extension of the RingCentral SDK for Java project.
If you are having difficulty using this SDK, or working with the RingCentral API, please visit our developer community forums for help and to get quick answers to your questions. If you wish to contact the RingCentral Developer Support team directly, please submit a help ticket from our developer website.
This SDK is tested against JDK 11 so we recommend using the same. Earlier versions such as Java 8 should work as well, please report issues if you encounter any.
repositories {
mavenCentral()
}
dependencies {
implementation 'com.ringcentral:ringcentral-pubnub:[version]'
}
Don't forget to replace [version]
with expected version. You can find the latest versions in Maven Central.
<dependency>
<groupId>com.ringcentral</groupId>
<artifactId>ringcentral-pubnub</artifactId>
<version>[version]</version>
</dependency>
Don't forget to replace [version]
with expected version. You can find the latest versions in Maven Central.
Download jar here and save it into your java classpath.
RestClient rc = new RestClient(clientId, clientSecret, server);
rc.authorize(username, extension, password);
Subscription subscription = new Subscription(rc,
new String[]{
"/restapi/v1.0/glip/posts",
"/restapi/v1.0/account/~/extension/~/message-store",
// more event filters here
},
(message) -> {
// do something with message
});
subscription.subscribe();
The notification message
you get is a java String
. If you know the message body type, you can deserialize it like this:
com.ringcentral.Utils.gson.fromJson(message, InstanceMessageEvent.class);
./gradlew test
Update version number in build.gradle
.
./gradlew uploadArchives
Go to https://s01.oss.sonatype.org/#stagingRepositories
Login, "Close" and "Release" the SDK.