Nativescript plugin from Applozic that wraps the Native chat UI for android and iOS
npm i --save nativescript-applozic-chat-fork
  • Version: 2.2.0
  • GitHub:
  • Downloads:
    • Last Day:   0
    • Last Week:  0
    • Last Month: 0

Applozic NativeScript Chat Plugin



  • Apps must target iOS 10 or later
  • Xcode 12 or later required


  • NativeScript 7 required check more on compatibility issues here


For NativeScript 7 compatibility, run.

tns plugin add nativescript-applozic-chat@2.0.0

For NativeScript 6 compatibility, run.

tns plugin add nativescript-applozic-chat@1.7.2

Goto src folder and run

npm run demo.ios



Add import

var nativescript_applozic_chat = require("nativescript-applozic-chat");

And then inside your funcation you can create the object of ApplozicChat to access it.

var applozicChat = new nativescript_applozic_chat.ApplozicChat();

Add import

import { ApplozicChat } from "nativescript-applozic-chat";

And then inside your funcation you can create the object of ApplozicChat to access it.

var applozicChat = new ApplozicChat();

Login/Register User

    var alUser = {
'userId' : userId, //Replace it with the userId of the logged in user NOTE: String userId
'password' : password, //Put password here NOTE: String password
'authenticationTypeId' : 1,
'applicationId' : 'applozic-sample-app' //replace "applozic-sample-app" with Application Key from Applozic Dashboard

applozicChat.login(alUser, function(response) {
applozicChat.launchChat(); //launch chat
}, function(error) {
console.log("onLoginFailure: " + error);

Launch Chat

Main Chat screen
Launch Chat with a specific User
Launch Chat with specific Group
        applozicChat.launchChatWithGroupId(groupId, function(response){
console.log("Success : " + response);
}, function(response){
console.log("Error : " + response);


applozicChat.logout(function(response) {
console.log("logout success: " + response);
}, function(error) {
console.log("logout error: "+ error);

Push Notification Setup instruction

Uploading the push notification certificate and GCM/FCM server key in applozic dashboard

a) For IOS upload your APNS push notification certificate to Applozic Dashboard page under 'Edit Application' section in order to enable real-time notification.

Go to Applozic Dashboard Push Notification Push Notification -> Upload APNS Certificate for Development and Distribution environment.

b) For Android go to Applozic Dashboard Push Notification and update the GCM/FCM server key under Push Notification -> GCM/FCM Key.



  1. Download these files
  2. Register you application in firebase console and download the google-services.json file.
  3. Get the FCM server key from firebase console.(There is a sender ID and a server key, make sure you get the server key).
  4. Go to Applozic Dashboard Push Notification and update the GCM/FCM server key under Push Notification -> GCM/FCM Key.

Steps to follow:

  1. Copy the pushnotification folder from the above downloaded files and paste it in path <your project>/platforms/android/src/main/java/com/tns/

  2. Add these lines in file <your project>/platforms/android/src/main/AndroidManifest.xml inside <application> tag

       <service android:name="com.tns.pushnotification.FcmListenerService">
             <action android:name="" />
             <action android:name="" />
  3. Add the same lines from step 2 in <your project>/app/App_Resources/Android/AndroidManifest.xml file inside <application> tag

  4. Paste thegoogle-services.json file in <your project>/platforms/android/ folder

  5. Open <your project>/platforms/android/build.gradle : add this inside dependency mentioned in top of the file (below classpath "") : classpath "" add this below apply plugin: "" : apply plugin: ""

  6. Call PushNotificationTask in onSuccess of applozic login as below:

    console.log("push success : " + response);
    }, function(response){
    console.log("push failed : " + response);

Note : Everytime you remove and add android platform you need to follow steps 1,2,4 and 5.


  1. Download delegate.ts file from this delegate.ts link and paste it under your project folder-->app-->delegate.ts

  2. Download app.ts file from the app.ts link and replace the app.ts file in your project if you have any changes then you can merge only required changes from the app.ts file link

NOTE : Above push notification setup for android and ios is in the case if your not using native script push plugin in your project