trycourier / courier-android

Inbox, Push Notifications & Preferences for Android
https://courier.com
5 stars 1 forks source link
android courier kotlin notifications
android-banner

Requirements & Support

Requirements
Courier Account Sign Up
Minimum Android SDK Version 23

Installation

1. Add Jitpack repository to your settings.gradle file

pluginManagement {
    repositories {
        ..
        maven { url 'https://jitpack.io' }
    }
}

dependencyResolutionManagement {
    repositories {
        ..
        maven { url 'https://jitpack.io' }
    }
}

2. Add the implementation to your app's build.gradle file

dependencies {
    implementation 'com.github.trycourier:courier-android:4.4.1' // Groovy
    implementation("com.github.trycourier:courier-android:4.4.1") // Gradle.kts
}

3. Initialize the SDK (Optional)

If you are only using CourierClient APIs you can skip this step.

// This example is on an Application class
// You can also do this with Activities or Fragments, but
// it is very important to call this before using other 
// parts of the Courier SDK
class YourApplication: Application() {

    override fun onCreate() {
        super.onCreate()

        // Initialize the SDK
        // This is used to give Courier access to SharedPreferences
        // Courier uses SharedPreferences to save some state between app sessions
        // This is important to create a great user experience around push notifications
        Courier.initialize(this)

    }

}

Getting Started

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.

Proguard

Here is what the Courier Android SDK automatically handles with Proguard:

Proguard Rules

Example Projects

Starter projects using this SDK.

Project Link Language
Example Kotlin

Share feedback with Courier

We want to make this the best SDK for managing notifications! Have an idea or feedback about our SDKs? Here are some links to contact us: