Socket
Socket
Sign inDemoInstall

cordova-plugin-firebase

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-firebase - npm Package Compare versions

Comparing version 0.1.14 to 0.1.15

2

package.json

@@ -11,3 +11,3 @@ {

"name": "cordova-plugin-firebase",
"version": "0.1.14",
"version": "0.1.15",
"description": "Cordova plugin for Google Firebase",

@@ -14,0 +14,0 @@ "cordova": {

# cordova-plugin-firebase
Cordova plugin for Google Firebase
This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project!
Android and iOS supported (including iOS 10).

@@ -9,7 +10,7 @@ ## Installation

```
<plugin name="cordova-plugin-firebase" spec="0.1.14" />
<plugin name="cordova-plugin-firebase" spec="0.1.15" />
```
or by running:
```
cordova plugin add cordova-plugin-firebase@0.1.14 --save
cordova plugin add cordova-plugin-firebase@0.1.15 --save
```

@@ -42,7 +43,7 @@ Download your Firebase configuration files, GoogleService-Info.plist for ios and google-services.json for android, and place them in the root folder of your cordova project:

### getInstanceId
### getToken
Get the device id (token):
Get the device token (id):
```
window.FirebasePlugin.getInstanceId(function(token) {
window.FirebasePlugin.getToken(function(token) {
// save this server-side and use it to push notifications to this device

@@ -56,2 +57,15 @@ console.log(token);

### onTokenRefresh
Register for token changes:
```
window.FirebasePlugin.onTokenRefresh(function(token) {
// save this server-side and use it to push notifications to this device
console.log(token);
}, function(error) {
console.error(error);
});
```
This is the best way to get a valid token for the device as soon as the token is established
### onNotificationOpen

@@ -186,3 +200,3 @@

// a numeric array containing the values of the byte array (i.e. [0xFF, 0x00])
bytes.array;
console.log(bytes.array);
}, function(error) {

@@ -196,3 +210,3 @@ console.error(error);

// a numeric array containing the values of the byte array (i.e. [0xFF, 0x00])
bytes.array;
console.log(bytes.array);
}, function(error) {

@@ -199,0 +213,0 @@ console.error(error);

@@ -5,2 +5,6 @@ exports.getInstanceId = function(success, error) {

exports.getToken = function(success, error) {
success();
};
exports.onNotificationOpen = function(success, error) {

@@ -10,3 +14,3 @@ success();

exports.onTokenRefreshNotification = function(success, error) {
exports.onTokenRefresh = function(success, error) {
success();

@@ -13,0 +17,0 @@ };

@@ -7,2 +7,6 @@ var exec = require('cordova/exec');

exports.getToken = function(success, error) {
exec(success, error, "FirebasePlugin", "getToken", []);
};
exports.onNotificationOpen = function(success, error) {

@@ -12,4 +16,4 @@ exec(success, error, "FirebasePlugin", "onNotificationOpen", []);

exports.onTokenRefreshNotification = function(success, error) {
exec(success, error, "FirebasePlugin", "onTokenRefreshNotification", []);
exports.onTokenRefresh = function(success, error) {
exec(success, error, "FirebasePlugin", "onTokenRefresh", []);
};

@@ -16,0 +20,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc