Before Getting Started
Overview
Clix leverages Firebase Cloud Messaging (FCM) to deliver notifications efficiently. The goal is to ensure a smooth integration process and reliable delivery of push notifications to your app users.Environment
- Android API level 26 (Android 8.0) or later
- Firebase account
Make sure you’ve completed the Firebase setup.If the setup is complete, the following items should be in place.
- Make sure google-services.json is in your project directory.
- Upload the Service Account Key file to the Clix console.
Setup Clix - Using CLI (Recommended)
Clix provides a Homebrew CLI for quick and easy setup. Use the install and doctor commands to automatically configure the required code and settings. For iOS projects, follow the CLI prompts to add the necessary files and configurations.Install Clix CLI
Run Install Command
The install command in the Clix CLI checks for required files and configurations, and provides appropriate installation guidance through prompts.Doctor Command
The clix doctor command checks whether the necessary code and configuration for using the Clix SDK are properly set up, and provides guidance on how to fix any issues.Setup Clix - Manual Installation
Integrate Firebase and Clix to manage and send notifications effectively from Clix console.
1. Installation
1. Installation
Clix Android SDK supports installation only via Gradle (Kotlin DSL).
settings.gradle.kts or build.gradle.kts:build.gradle.kts:build.gradle.kts :2. Initialize Clix with Config
2. Initialize Clix with Config
Add this code to You also need to integrate the code for requesting notification permissions. Add the code below to your Activity file and call this function when you want to prompt the user for notification permission.If you don’t have a specific preference, we recommend adding it to MainActivity.kt and calling it inside the onCreate method.
Application Class. The enpoint and logLevel parameters are optional.Application.kt
MainActivity.kt
3. Build & Run
3. Build & Run
Run your project to verify the setup works correctly. Go to Clix console > Test Console, find the registered device, send a push message, and check if the message is received properly on the device. Also, make sure the push events are being tracked in real time.
If you’re using an emulator, make sure it is started with Cold Boot to properly test push notification delivery. For more details, see this guide.