The Courier Android SDK provides prebuilt UI components and Kotlin APIs for adding in-app notifications, push notifications, and notification preferences to your Android app. It handles authentication, token management, and real-time message delivery.
Add the Jitpack repository to your settings.gradle:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}Add the dependency to your app's build.gradle:
dependencies {
implementation 'com.github.trycourier:courier-android:LATEST_VERSION'
}Find the latest version on GitHub Releases. Requires Android SDK 23+ and Gradle 8.4+.
// Initialize in your Application class
Courier.initialize(this)
// Sign in the user (JWT generated by your backend)
lifecycleScope.launch {
Courier.shared.signIn(
accessToken = jwt,
userId = "user_123"
)
}
// Add a prebuilt Inbox (Jetpack Compose)
CourierInbox(
onClickMessageListener = { message, index ->
if (message.isRead) message.markAsUnread() else message.markAsRead()
}
)
// Add a prebuilt Preferences view
CourierPreferences(mode = CourierPreferences.Mode.Topic)Full documentation: courier.com/docs/sdk-libraries/android
These are all the available features of the SDK.
| Feature | Description | |
|---|---|---|
| 1 |
Authentication
|
Manages user credentials between app sessions. Required if you would like to use Inbox, Push Notifications and Preferences.
|
| 2 |
Inbox
|
An in-app notification center you can use to notify your users. Comes with a prebuilt UI and also supports fully custom UIs. |
| 3 |
Push Notifications
|
Automatically manages push notification device tokens and gives convenient functions for handling push notification receiving and clicking. |
| 4 |
Preferences
|
Allow users to update which types of notifications they would like to receive. |
| 5 |
CourierClient
|
The base level API wrapper around the Courier endpoints. Useful if you have a highly customized user experience or codebase requirements. |
Here is what the Courier Android SDK automatically handles with Proguard:
Proguard Rules
Starter projects using this SDK.
| Project Link | Language |
|---|---|
Example
|
Kotlin |
We want to make this the best SDK for managing notifications! Have an idea or feedback about our SDKs? Let us know!