Comments (10)
As you'll see from the CHANGELOG, this fork has deviated from cordova-plugin-firebase
such that cordova-plugin-firebasex
is no longer the same plugin as cordova-plugin-firebase
- it has a different API and behaviour, e.g. onNotificationOpen()
renamed to onMessageReceived()
The @ionic-native/firebase
wrapper points at cordova-plugin-firebase
so if you want to use this fork, you'll need to use it directly via the JS API rather than via the Ionic Native Typescript wrapper for cordova-plugin-firebase
.
from cordova-plugin-firebasex.
I feel you, we can have this transform as onNotificationOpen:
onNotificationOpen() {
return new Observable(observer => {
(window as any).FirebasePlugin.onMessageReceived((response) => {
observer.next(response);
});
});
}
from cordova-plugin-firebasex.
@dpa99c Does downgrading cordova-plugin-firebasex
to version 4.0.0 resolve onNotificationOpen
problem?
from cordova-plugin-firebasex.
@Abdulrahmanh95 v4.0.0 is out-of-date with respect to the version which contains numerous bug fixes and additional features. I would not recommend using 4.0.0 for this reason.
from cordova-plugin-firebasex.
@dpa99c Thanks a lot.
I've just fix it with version 6 is working properly with my ionic 3 application.
from cordova-plugin-firebasex.
@Abdulrahmanh95,
I am using ionic 3 and added this plugin as well. And i am struck without import firebase how to use the methods? can i get some sample script. Thanks Benny
from cordova-plugin-firebasex.
before:
this.firebase.onNotificationOpen();
after:
(this.firebase as any).onMessageReceived();
from cordova-plugin-firebasex.
@benskarunya
You just have to use without firebase service (using plain JavaScript):
(<any>window).FirebasePlugin.onNotificationOpen(function (response) {
if (response.tap) { console.log('push to some page'); }
})
and you can receive the token the same way:
(<any>window).FirebasePlugin.getToken(function (token) { console.log('token', token); })
from cordova-plugin-firebasex.
I'm getting Cannot read property 'setScreenName' of undefined
if I do ionic cordova run android
and set a breakpoint, FirebasePlugin is undefined..
(window as any).FirebasePlugin
anyone have any idea..?
from cordova-plugin-firebasex.
my bad make sure you use cordova android >8
from cordova-plugin-firebasex.
Related Issues (20)
- unable to install the plugin in meteorjs
- Build error IPHONEOS_DEPLOYMENT_TARGET HOT 2
- IOS | Questioning automatic badge increment HOT 1
- IOS_FIREBASE_SDK_VERSION flag is ignored HOT 1
- grantPermission() never prompts user on Android
- IOS - Cordova Build in 720 seconds? HOT 4
- android:exported needs to be explicitly specified for element HOT 1
- [FR][IOS] Impementation of initiateOnDeviceConversionMeasurement method HOT 1
- [FR] [iOS] Expose the registerForRemoteNotifications method HOT 2
- @dpa99c @peterdsp HOT 2
- not display any tip HOT 1
- ios: missing FirebaseAnalytics pod HOT 1
- Re: Update your apps to the latest Firebase Cloud Messaging APIs and SDKs HOT 1
- TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('ENOENT') HOT 10
- Push Notifications not received when app is in background HOT 3
- 16.3.0 issue on IOS Compilation HOT 1
- QUESTION: Discontinued Legacy Firebase Cloud Messaging APIs and SDKs HOT 3
- Not supported for latest rxjs HOT 1
- Not able to receive push notification with Cordova firebasex plugin Android 12 & 13 HOT 1
- Cordova plugin firebasex not working Android HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-firebasex.