Developer Docs | Kommunicate

Developer Docs | Kommunicate

  • Docs

›Ionic/Capacitor

Web

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

Android

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

iOS

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

React Native

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

Flutter

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

Ionic/Cordova/Phonegap

  • 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

Platform APIs

  • Authentication
  • Endpoints

Dashboard Features

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

Configuration

  • Email Fallback
  • Webhooks
  • Access Token URL

Push notification

Push Notification setup

Android

  1. Create your app on firebase and download the google-services.json file: https://console.firebase.google.com/project

  2. Copy the firebase server key and add it in Kommunicate dashboard under Developer -> Push notifications -> Android -> FCM/GCM Key

  3. Download the google-services.json file from firebase dashboard and paste it under your project/android/app/ directory

  4. Copy the KmFirebaseService file from here and paste it in your project's java directory project/android/app/src/main/java/

  5. Add the below configurations in your AndroidManifest.xml file inside the <application tag:

        <service
            android:name="com.getcapacitor.CapacitorFirebaseMessagingService"
            tools:node="remove" />

        <service
            android:name="com.applozic.mobicomkit.uiwidgets.KmFirebaseMessagingService"
            tools:node="remove" />

        <service
            android:name=".KmFirebaseService"
            android:stopWithTask="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
  1. Add the below entry inside the <manifest tag in your AndroidManifest.xml file:
    xmlns:tools="http://schemas.android.com/tools"
    

iOs

  1. Generate your debug and production certificates from your apple developer account and upload on Kommunicate dashboard.

  2. Follow the steps from here to upload the certificates and add notification capabilities: https://docs.kommunicate.io/docs/ios-pushnotification#certificates

  3. Download the KommunicateWrapper.swift file from here

  4. Add the KommunicateWrapper.swift file to the project target. Click on -> Add files to 'YourProject' -> Select the downloaded KommunicateWrapper.swift file

  5. Do the below changes in your AppDelgate.swift file: a. Add import for UserNotifications: import UserNotifications

    b. implement the UNUserNotificationCenterDelegate:

    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
    

    c. Call the KommunicateWrapper methods in the respective AppDelegate methods as below:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
   // Override point for customization after application launch.
   UNUserNotificationCenter.current().delegate = self
   KommunicateWrapper.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
   return true
 }
   
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping       (UNNotificationPresentationOptions) -> Void) {
           KommunicateWrapper.shared.userNotificationCenter(center, willPresent: notification, withCompletionHandler: { options in
               completionHandler(options)
           })
   }
   
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
           KommunicateWrapper.shared.userNotificationCenter(center, didReceive: response, withCompletionHandler: {
               completionHandler()
           })
       }

func applicationDidEnterBackground(_ application: UIApplication) {
   // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
   // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
   KommunicateWrapper.shared.applicationDidEnterBackground(application: application)
 }

func applicationWillEnterForeground(_ application: UIApplication) {
   // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
   KommunicateWrapper.shared.applicationWillEnterForeground(application: application)
   UIApplication.shared.applicationIconBadgeNumber = 0
 }

func applicationWillTerminate(_ application: UIApplication) {
   // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
   KommunicateWrapper.shared.applicationWillTerminate(application: application)
 }

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
   NotificationCenter.default.post(name: Notification.Name(CAPNotifications.DidRegisterForRemoteNotificationsWithDeviceToken.name()), object: deviceToken)
   print("DEVICE_TOKEN_DATA :: \(deviceToken.description)") // (SWIFT = 3) : TOKEN PARSING
   KommunicateWrapper.shared.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
 }
← AuthenticationCustomization →
  • Push Notification setup
    • Android
    • iOs
Facebook Open Source

IndiQube Octagon
Site No. 643, 80 Feet Road,
4th Block, Koramangala,
Bengaluru, Karnataka,
India, 560034

(+1) (310) 402-2374
support@kommunicate.io

Docs
WebAndroidiOSIonic/PhonegapReact NativeFlutter
Product
Pricing and FAQsRequest Demo
Social
FacebookTwitterLinkedinYoutube
Copyright © 2022 Kommunicate.io.