Developer Docs | Kommunicate

Developer Docs | Kommunicate

  • Book a Demo
  • Try For Free

›Android

Web

  • Installation
  • CMS Installation
  • Authentication
  • Conversation
  • Conversation Assignment
  • Customization
  • Localization
  • Logout
  • Troubleshooting

Android

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout
  • Migration
  • Troubleshooting

iOS

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Configuration
  • Localization
  • Logout
  • Troubleshooting

React Native

  • Installation
  • Expo Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Logout
  • Troubleshooting

Flutter Mobile

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Troubleshooting

Flutter Web

  • Installation
  • Authentication
  • Conversation

Ionic/Cordova

  • Installation
  • Authentication
  • Push Notification
  • Conversation
  • Customization
  • Localization
  • Logout
  • Resolving Errors

Ionic/Capacitor

  • Installation
  • Authentication
  • Push notification
  • Customization

Rich Messages

  • How To Use
  • Types of Rich Messages

Bots

  • Bot setup
  • Dialogflow Integration
  • Lex Integration
  • Kompose Bot Builder
  • IBM Watson Integration
  • Custom Bot Integration
  • Import Kompose Bot
  • Bot Samples

Integrations

  • Zapier
  • WhatsApp
  • WhatsApp 360Dialog
  • WhatsApp Twilio
  • WhatsApp Cloud API
  • Instagram Integration
  • Telegram Integration
  • Sunshine Integration
  • Freshdesk Integration
  • Pipedrive Integration
  • Agile Integration

Platform APIs

  • Authentication
  • Endpoints

Dashboard Features

  • Analytics
  • Conversations
  • Users
  • Bot Integration
  • Helpcenter
  • Campaign Messaging
  • Settings

Configuration

  • Single Sign On (SSO) Setup
  • Webhooks
  • Access Token URL
  • Email Fallback

Push Notification

Overview

You can set up push notifications to notify your end users for incoming chat messages.

Setting up Push Notification

For managing push notifications, you must have a Firebase account.

  1. Once you have created a Firebase account, setup Firebase in your project.
  2. When you have setup Firebase in your project, you can setup Firebase Cloud Messaging client app on Android by following the official Firebase documentation.

Obtain private json file from firebase

  1. From Firebase console, click Settings icon -> Project settings

  2. Once you click project settings select the Service Accounts tab under Settings.

  3. Now click the Generate new private key button. This will download a .json file. Store the private file safe.

firebase_new.png

  1. If Firebase Cloud Messaging API is not enabled for the firebase project, Please enable it on cloud console first.

firebase_1.png

Add your private json file to Kommunicate

Go to Push notification section in Kommunicate dashboard and upload the the json file(was downloaded in step 3) under Android Section.

Send the device token to Kommunicate

If your Firebase Messaging setup is done, the next step would be to send the deviceToken to Kommunicate. This needs to be done in onNewToken method of your FirebaseMessagingService subclass. The onNewToken method is called whenever firebase updates the deviceToken on that device.

Note: onNewToken method provides token, this is the deviceToken.

Use the below code to send the token to Kommunicate.

Kotlin

If you are using Kotlin:

override fun onNewToken(token: String) {
        super.onNewToken(registrationId)
        Log.d(TAG, "Refreshed token: $token")
        Kommunicate.updateDeviceToken(context, token)
}

Java

If you are using Java:

@Override
public void onNewToken(String token) {
    super.onNewToken(registrationId);
    Log.d(TAG, "Refreshed token: " + token);
    Kommunicate.updateDeviceToken(context, token);
}

Receive push notifications

Using the device token, Kommunicate will send the message to the device. For Receiving FCM Notifications in your app, add the following code in your FirebaseMessagingService class.

Kotlin

If you are using Kotlin:

override fun onMessageReceived(remoteMessage: RemoteMessage) {
    Log.i(TAG, "FCM notification processing...")

    if (Kommunicate.isKmNotification(context, remoteMessage.data)) {
        return
    }
    super.onMessageReceived(remoteMessage)
}

Java

If you are using Java:

@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
    Log.i(TAG, "FCM notification processing...");

    if (Kommunicate.isKmNotification(this, remoteMessage.getData())) {
        return;
    }
    super.onMessageReceived(remoteMessage);
}

Enabling Background Notifications for Killed Apps

To receive notifications even when the app is not running, add the Firebase RECEIVE permission to your AndroidManifest.xml file.

  • Open your AndroidManifest.xml file and add the following permission:
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

Set notification small icon

To set the notification small icon, place the below metadata in your AndroidManifest.xml file under </application> tag :

 <meta-data 
    android:name="com.applozic.mobicomkit.notification.smallIcon"
    android:resource="<YOUR_LAUNCHER_SMALL_ICON>" /> <!-- Replace this with a valid resource name for Launcher white Icon -->

Note: Android version 6.0 onwards, android automatically converts the small icon color to monochrome. While some custom ROM devices do show colored icons, it is recommended that you use a shaped icon with some transparent background instead of round solid icons as a small icon.

← AuthenticationConversation →
  • Overview
    • Setting up Push Notification
    • Receive push notifications
    • Enabling Background Notifications for Killed Apps
    • Set notification small icon

Ready to automate more than 80% of your customer support?

Try for Free
  • support@kommunicate.io
  • United States
    (+1) (310) 402-2374
  • India
    (+91) 974-057-0196
  • Learn
    • iOS Chatbot
    • Amazon Lex Chatbot
    • Chatbot in Android
    • ChatGPT with Flutter
    • Document to Chatbot
    • React Native Chatbot
    • Create Flutter Chatbot
    • Whatsapp Business API
    • Integrate React Js Chatbot
    • Whatsapp Chatbot Using NodeJs
    • Integrate ChatGPT With Whatsapp
    • Integrate Dialogflow With Whatsapp
    • ChatGPT For Product Engagement
    • Product
    • AI Chatbot Builder
    • Generative AI Chatbot
    • Customer Experience
    • Chatbot Features
    • Dialogflow Integration
    • FAQ Chatbot
    • Live Chat
      Industries
    • Healthcare Chatbot
    • E-commerce Chatbot
    • Education Chatbot
    • Banking Chatbot
  • Integrations
    • E-commerce Chatbot Integration
    • Omnichannel Chatbot
    • Chatbot Integration
    • Chatbot for Website
    • Mobile Apps Chatbot
    • Chatbot for CRM's
    • Automation and Analytics
    • Zendesk Chatbot Integration
  • Resources
    • Chatbots Templates
    • Case Studies
    • Whitepapers
    • Chatbot Guide
    • Videos
    • Knowledge Hub
    • Comparisons
    • ROI Calculator
    • Blogs
    • Company
    • Partner Program
    • Affiliate Program
    • Pricing
    • About Us
    • Media
      Support
    • Contact Us
    • HelpCenter
    • Stack Overflow
    • API Status
  • Comapare
    • Kommunicate Vs Verloop
    • Kommunicate Vs Intercom
    • Kommunicate Vs Yellow
    • Kommunicate Vs Twak
    • Kommunicate Vs Ada
Arabic
Hindi
Spanish
French
German
Portuguese
Urdu
Software Advice Frontrunners for Live Chat Mar-22Software Advice Frontrunners for Live Chat Mar-22crozdesk badgeISO certificationHIPAA complianceGDPR compliant - GDPR Copy 12Created with Sketch.COMPLIANT
Copyright © 2025 Kommunicate.io.
T&C Privacy Policy Career SLA DPA Sitemap