A simple cordova plugin that integrates Firebase and Intercom cordova plugins, allowing to send and receive Intercom's Push Notifications on Android's devices.
Heavily based on Intercom's FCM documentation.
1. Add to your project
cordova plugin add https://github.com/roalcantara/cordova-plugin-firebase-intercom
2. Sets your FCM icon (optional)
As explained on Intercom's docs, an image named intercom_push_icon.png
must be added for each supported density.
Let's say your app supports xxhdpi, xhdpi, hdpi and mdpi. In this case, your would:
2.1 Add each supported icon on the respective resource folder, that is:
/your-awesome-app/resources/android/drawable-hdpi/notification_icon.png
/your-awesome-app/resources/android/drawable-mdpi/notification_icon.png
/your-awesome-app/resources/android/drawable-xhdpi/notification_icon.png
/your-awesome-app/resources/android/drawable-xxhdpi/notification_icon.png
2.2 Add the icons references on config.xml:
<resource-file src="resources/android/drawable-mdpi/intercom_push_icon.png" target="app/src/main/res/drawable-mdpi/intercom_push_icon.png" />
<resource-file src="resources/android/drawable-hdpi/intercom_push_icon.png" target="app/src/main/res/drawable-hdpi/intercom_push_icon.png" />
<resource-file src="resources/android/drawable-xhdpi/intercom_push_icon.png" target="app/src/main/res/drawable-xhdpi/intercom_push_icon.png" />
<resource-file src="resources/android/drawable-xxhdpi/intercom_push_icon.png" target="app/src/main/res/drawable-xxhdpi/intercom_push_icon.png" />
<resource-file src="resources/android/drawable-xxxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxxhdpi/notification_icon.png" />
3. And build the project
cordova build android
$ git clone https://github.com/roalcantara/cordova-plugin-firebase-intercom.git
- Clone the project$ cd cordova-plugin-firebase-intercom
- Go into the project folder$ npm run install
- Install all dependencies
$ npm run test
to run the specs
- Bug reports and pull requests are welcome on GitHub
- Follow the Semantic Versioning Specification
- Follow the GitHub Flow
- Follow the 5 Useful Tips For A Better Commit Message article and the How to Write a Git Commit Message post
- Use Commitizen cli when committing
Everyone interacting in the cordova-plugin-firebase-intercom project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
The package is available as open source under the terms of the MIT license.