Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Intercom

Improve this doc

This is a plugin that allows your Ionic app to use Intercom for iOS and/or Intercom for Android. Follow the offical documentation to setup this plugin correctly: https://developers.intercom.com/docs/cordova-phonegap-configuration

Repo: https://github.com/intercom/intercom-cordova

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-intercom
    $ npm install --save @ionic-native/intercom@4
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { Intercom } from '@ionic-native/intercom';


constructor(private intercom: Intercom) { }

...

this.intercom.registerUnidentifiedUser();
...
this.intercom.registerForPush();

Instance Members

registerIdentifiedUser(options)

Register a identified user

Param Type Details
options any

Options

Returns: Promise<any> Returns a promise

registerUnidentifiedUser(options)

Register a unidentified user

Param Type Details
options any

Options

Returns: Promise<any> Returns a promise

reset()

This resets the Intercom integration’s cache of your user’s identity and wipes the slate clean.

Returns: Promise<any> Returns a promise

setSecureMode(secureHash, secureData)

Param Type Details
secureHash string
secureData any

Returns: Promise<any> Returns a promise

setUserHash(secureHash)

Param Type Details
secureHash string

Returns: Promise<any> Returns a promise

updateUser(attributes)

Param Type Details
attributes any

Returns: Promise<any> Returns a promise

logEvent(eventName, metaData)

Param Type Details
eventName string
metaData any

Returns: Promise<any> Returns a promise

displayMessenger()

Returns: Promise<any> Returns a promise

displayMessageComposer()

Returns: Promise<any> Returns a promise

displayMessageComposerWithInitialMessage(initialMessage)

Param Type Details
initialMessage string

Returns: Promise<any> Returns a promise

displayConversationsList()

Returns: Promise<any> Returns a promise

unreadConversationCount()

Returns: Promise<any> Returns a promise

setLauncherVisibility(visibility)

Param Type Details
visibility string

Returns: Promise<any> Returns a promise

setInAppMessageVisibility(visibility)

Param Type Details
visibility string

Returns: Promise<any> Returns a promise

hideMessenger()

Returns: Promise<any> Returns a promise

registerForPush()

Returns: Promise<any> Returns a promise

API

Native

General