Skip to main content

Installation

The Java SDK's root package is com.notificationhub.sdk. Add it to your project using your build tool of choice, pointing at wherever your organization publishes the artifact (internal Maven repository, GitHub Packages, or Maven Central, depending on your setup).

Maven

<dependency>
<groupId>io.github.sumitshresht</groupId>
<artifactId>notificationhub-java-sdk</artifactId>
<version>REPLACE_WITH_LATEST_VERSION</version>
</dependency>

Gradle (Kotlin DSL)

dependencies {
implementation("io.github.sumitshresht:notificationhub-java-sdk:REPLACE_WITH_LATEST_VERSION")
}

Requirements

  • Java 11+ (the SDK uses java.net.http.HttpClient, introduced in Java 11)
  • Jackson (jackson-databind, jackson-datatype-jsr310) on the classpath for JSON (de)serialization
Spring Boot

If you're on Spring Boot, see Spring Boot Auto-Configuration — the SDK ships a NotificationHubAutoConfiguration that wires up a NotificationHubClient bean from application.yml.

Next step

Continue to the Quickstart to send your first notification.