Code Monkey home page Code Monkey logo

intercom-cordova's Introduction

Intercom

Intercom for Cordova/PhoneGap

This is a plugin that allows your Cordova or PhoneGap app to use Intercom for iOS and/or Intercom for Android.

  • Intercom for iOS supports iOS 8, 9, 10 & 11.
  • Intercom for Android supports API 19 and above.

Installation

Cordova

To install the plugin in your Cordova app, run the following:

cordova plugin add cordova-plugin-intercom

PhoneGap

To add the plugin to your PhoneGap app, add the following to your config.xml:

<plugin name="cordova-plugin-intercom" version="~5.1.1" />

Ionic

Intercom is compatible with both Ionic 1 & 2. To use the Intercom with Ionic, run the following:

cordova plugin add cordova-plugin-intercom

Make sure you initialize Intercom correctly.

Ionic 1

For Ionic 1 you can use Intercom like this:

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    cordova.plugins.intercom.registerIdentifiedUser({userId: "123456"});
    cordova.plugins.intercom.setLauncherVisibility('VISIBLE');
  });
})

Ionic 2

For Ionic 2 you need to add the folling variable to your app.component.ts:

declare var cordova:any;

You can then use Intercom like this:

this.platform.ready().then(() => {
    cordova.plugins.intercom.registerIdentifiedUser({userId: "12345"});
    cordova.plugins.intercom.setLauncherVisibility('VISIBLE');
});

Example App

An example app is provided here that shows a basic Cordova/Phonegap app integration with Intercom.

Setup and Configuration

Acknowledgements

Thanks to Josh Dover from AskU for making a Cordova plugin for Intercom for iOS which helped lots of people to integrate Intercom in their iOS Cordova apps. ๐Ÿ‘

License

intercom-cordova is released under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.