cordova-plugin-firebase-messaging-bg

1.5.4 • Public • Published

Cordova Firebase Messaging Plugin

This plugin adds Firebase Cloud Messaging support to your Cordova and Phonegap apps.

The goal was have push notifications be fired as native javascript events and make of Promises.

How do I install it?

cordova plugin add https://github.com/blakgeek/cordova-plugin-firebase-messaging

or

phonegap local plugin add https://github.com/blakgeek/cordova-plugin-firebase-messaging

How do I use it?

window.addEventListener('pushnotification', function(notification) {
    
    // was the app in the forground when the notification was received?
    var inForground = notification.$foreground;
    // was the app active when then notification was received?
    notification.$active;
    
    alert()
}, false);

This plugin was inspired by this great plugin https://github.com/fechanique/cordova-plugin-fcm thanks fechanique.

Package Sidebar

Install

npm i cordova-plugin-firebase-messaging-bg

Weekly Downloads

1

Version

1.5.4

License

MIT

Unpacked Size

38.1 kB

Total Files

16

Last publish

Collaborators

  • carloslawton