Chat APIs and In-app Messaging SDKs for Developers, by Developers

Applozic powers multi-platform Chat APIs and in-app Messaging SDKs for Android, iOS and the Web that will enable you to build advanced in-app chat solutions your users will love.

Integrate chat in your application with completely customizable UI kits, powerful messaging APIs and SDKs, developed with exceptional security measures in mind.

Guides    API Explorer

NativeScript

NativeScript adding contacts doc

Adding contacts

You can add your own contacts to your application in onSucess of applozic login.
Call the below function to add contacts:

var contacts = [{
          'userId' : 'adarsh', 
          'fullName' : 'Adarsh Kumar',
          'imageUrl' : 'http://testimage.png'
        }, 
          {
            'userId' : 'ranjeet', 
            'fullName' : 'Ranjeet Priyadarshi',
            'imageUrl' : 'http://testimage.png'
          }
        ];
applozicChat.addContacts(contacts);

Displaying only the added contacts

You can allow the SDK to display only the added contacts. Call the below function:

applozicChat.showOnlyMyContacts(true); //set false to disbale this setting

Apart calling the above function you will have to pass contactType as 1 in each contact when adding them.

var contacts = [{
          'userId' : 'adarsh', 
          'fullName' : 'Adarsh Kumar',
          'contactType' : 1
        }, 
          {
            'userId' : 'ranjeet', 
            'fullName' : 'Ranjeet Priyadarshi',
            'contactType' : 1
            }
        ];
applozicChat.addContacts(contacts);

Showing all registered users

You can show all the registered users of the application in the contact list by calling the below function

applozicChat.showAllRegisteredUsers();

Updated 2 years ago


What's Next

Groups

NativeScript


NativeScript adding contacts doc

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.