Notifizz Java SDK
The notifizz-java SDK is the official Notifizz client for Java and Kotlin. It is published to Maven Central. Use it to track events, run workflows, generate hashed user tokens, and send notifications to the Notification Center.Installation
Add the dependency to your project. No custom repository or credentials are required; Maven Central is used by default.Maven
Gradle (Groovy)
Gradle (Kotlin DSL)
Initialize the client
Track events with workflows
Calltrack() with a map containing eventName, sdkSecretKey, and properties. Then attach workflows and recipients, and call send() on the context:
.workflow(campaignId, recipients) calls before calling send().
Generate a hashed user token
Use this for backend authentication (e.g. when the Notification Center is authenticated with a backend token):Send a notification to the Notification Center
Configuration
Configure client options such as the auto-send delay (in milliseconds) for tracked events:API summary
| Method | Description |
|---|---|
new NotifizzClient(authSecretKey, sdkSecretKey) | Create a client. |
client.track(props) | Start tracking an event; props contains eventName, sdkSecretKey, properties. Returns a TrackContext. |
context.workflow(campaignId, recipients) | Attach a workflow and recipients (chainable). |
context.send() | Send the tracked event (call after adding workflows). |
client.generateHashedToken(userId) | Generate a hashed token for the user. |
client.send(request) | Send a notification to the Notification Center. request has notifId and properties (including recipients). |
client.config(opts) | Configure options (e.g. autoSendDelayMs). |