firebase fcm Push notification
I try to send a push notification from Firebase FCM to my ionic application, but my application never receives the notification and, after 3 days of search, I can't find any solution! I am going crazy!
- I've tried to create a new blank application (
ionic start myApp blank), - I've enable android (
ionic cordova platform add android) - I've created my app in Firebase, downloaded google-services.json and pasted it in my app root folder and in my app
platform/android/appfolder - I've installed phonegap-plugin-push (
ionic cordova plugin add phonegap-plugin-pushandnpm install --save @ionic-native/push) - I've pasted this code https://ionicframework.com/docs/native/push/ in my app.component.ts
- I've added my senderId in android conf (app.component.ts)
- I've imported push module in app.module.ts
- Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothing
The most incredible is that: If I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
Also Incredible: Notifications has correctly worked 2 hours when I try my first notifications and suddenly stop working without any modification anywhere.
I've tried to restart many new apps from zero and impossible to receive any fucking push notification.
Any idea? Someone already has the same problem?
PS: here my console output:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Ionic Native: deviceready event fired after 430 ms
We have permission to send push notifications
Channel created
Channel deleted
List of channels Array(0) length: 0
Device registered
Object
registrationId:
"fbaXyRApJ2k:APA91bHdA5LkxeOfrpNRud0_jetEpb1j93Qn9Bm5TXDp6DpU1TpuWdYHWjKrSdLBaRLizezBJ0Ls1dOr_nYRvOlS4KXSJ6nspaDPKb4nGFUXKFDYclPf24rcYJfGITcImvxcHOpJGHhe"
registrationType: "FCM"
__proto__: Object
|
show 2 more comments
I try to send a push notification from Firebase FCM to my ionic application, but my application never receives the notification and, after 3 days of search, I can't find any solution! I am going crazy!
- I've tried to create a new blank application (
ionic start myApp blank), - I've enable android (
ionic cordova platform add android) - I've created my app in Firebase, downloaded google-services.json and pasted it in my app root folder and in my app
platform/android/appfolder - I've installed phonegap-plugin-push (
ionic cordova plugin add phonegap-plugin-pushandnpm install --save @ionic-native/push) - I've pasted this code https://ionicframework.com/docs/native/push/ in my app.component.ts
- I've added my senderId in android conf (app.component.ts)
- I've imported push module in app.module.ts
- Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothing
The most incredible is that: If I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
Also Incredible: Notifications has correctly worked 2 hours when I try my first notifications and suddenly stop working without any modification anywhere.
I've tried to restart many new apps from zero and impossible to receive any fucking push notification.
Any idea? Someone already has the same problem?
PS: here my console output:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Ionic Native: deviceready event fired after 430 ms
We have permission to send push notifications
Channel created
Channel deleted
List of channels Array(0) length: 0
Device registered
Object
registrationId:
"fbaXyRApJ2k:APA91bHdA5LkxeOfrpNRud0_jetEpb1j93Qn9Bm5TXDp6DpU1TpuWdYHWjKrSdLBaRLizezBJ0Ls1dOr_nYRvOlS4KXSJ6nspaDPKb4nGFUXKFDYclPf24rcYJfGITcImvxcHOpJGHhe"
registrationType: "FCM"
__proto__: Object
2
please try with this plugin ionicframework.com/docs/native/fcm
– keval nayak
Nov 14 '18 at 13:41
Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothinghere you're saying that your don't receive your push notification, and here you say that you receive your push notificationIf I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
– saperlipopette
Nov 14 '18 at 14:14
@saperlipopette I receive notification only if I target specific device (with the button "Test on a device" on firebase). It only work with this "test on a device" button who's not usable to send push to all subscribers...
– Fabien
Nov 14 '18 at 14:21
@kevalnayak, I try to install plugin you suggested, but in the official doc, there is a "backend" var who isn't declared anywhere so i can't compile. Any idea about this ? thank's
– Fabien
Nov 14 '18 at 14:32
As suggested by Keval, you should try to use the FCM plugin instead. AFAIK the push plugin has been made for Google Cloud Messaging, and I'm not sure that broadcasting a notification to an app was supported. It's a feature of Firebase Cloud Messaging.
– saperlipopette
Nov 14 '18 at 14:34
|
show 2 more comments
I try to send a push notification from Firebase FCM to my ionic application, but my application never receives the notification and, after 3 days of search, I can't find any solution! I am going crazy!
- I've tried to create a new blank application (
ionic start myApp blank), - I've enable android (
ionic cordova platform add android) - I've created my app in Firebase, downloaded google-services.json and pasted it in my app root folder and in my app
platform/android/appfolder - I've installed phonegap-plugin-push (
ionic cordova plugin add phonegap-plugin-pushandnpm install --save @ionic-native/push) - I've pasted this code https://ionicframework.com/docs/native/push/ in my app.component.ts
- I've added my senderId in android conf (app.component.ts)
- I've imported push module in app.module.ts
- Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothing
The most incredible is that: If I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
Also Incredible: Notifications has correctly worked 2 hours when I try my first notifications and suddenly stop working without any modification anywhere.
I've tried to restart many new apps from zero and impossible to receive any fucking push notification.
Any idea? Someone already has the same problem?
PS: here my console output:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Ionic Native: deviceready event fired after 430 ms
We have permission to send push notifications
Channel created
Channel deleted
List of channels Array(0) length: 0
Device registered
Object
registrationId:
"fbaXyRApJ2k:APA91bHdA5LkxeOfrpNRud0_jetEpb1j93Qn9Bm5TXDp6DpU1TpuWdYHWjKrSdLBaRLizezBJ0Ls1dOr_nYRvOlS4KXSJ6nspaDPKb4nGFUXKFDYclPf24rcYJfGITcImvxcHOpJGHhe"
registrationType: "FCM"
__proto__: Object
I try to send a push notification from Firebase FCM to my ionic application, but my application never receives the notification and, after 3 days of search, I can't find any solution! I am going crazy!
- I've tried to create a new blank application (
ionic start myApp blank), - I've enable android (
ionic cordova platform add android) - I've created my app in Firebase, downloaded google-services.json and pasted it in my app root folder and in my app
platform/android/appfolder - I've installed phonegap-plugin-push (
ionic cordova plugin add phonegap-plugin-pushandnpm install --save @ionic-native/push) - I've pasted this code https://ionicframework.com/docs/native/push/ in my app.component.ts
- I've added my senderId in android conf (app.component.ts)
- I've imported push module in app.module.ts
- Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothing
The most incredible is that: If I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
Also Incredible: Notifications has correctly worked 2 hours when I try my first notifications and suddenly stop working without any modification anywhere.
I've tried to restart many new apps from zero and impossible to receive any fucking push notification.
Any idea? Someone already has the same problem?
PS: here my console output:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Ionic Native: deviceready event fired after 430 ms
We have permission to send push notifications
Channel created
Channel deleted
List of channels Array(0) length: 0
Device registered
Object
registrationId:
"fbaXyRApJ2k:APA91bHdA5LkxeOfrpNRud0_jetEpb1j93Qn9Bm5TXDp6DpU1TpuWdYHWjKrSdLBaRLizezBJ0Ls1dOr_nYRvOlS4KXSJ6nspaDPKb4nGFUXKFDYclPf24rcYJfGITcImvxcHOpJGHhe"
registrationType: "FCM"
__proto__: Object
edited Nov 14 '18 at 13:49
Saran
2,97312750
2,97312750
asked Nov 14 '18 at 12:58
FabienFabien
345114
345114
2
please try with this plugin ionicframework.com/docs/native/fcm
– keval nayak
Nov 14 '18 at 13:41
Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothinghere you're saying that your don't receive your push notification, and here you say that you receive your push notificationIf I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
– saperlipopette
Nov 14 '18 at 14:14
@saperlipopette I receive notification only if I target specific device (with the button "Test on a device" on firebase). It only work with this "test on a device" button who's not usable to send push to all subscribers...
– Fabien
Nov 14 '18 at 14:21
@kevalnayak, I try to install plugin you suggested, but in the official doc, there is a "backend" var who isn't declared anywhere so i can't compile. Any idea about this ? thank's
– Fabien
Nov 14 '18 at 14:32
As suggested by Keval, you should try to use the FCM plugin instead. AFAIK the push plugin has been made for Google Cloud Messaging, and I'm not sure that broadcasting a notification to an app was supported. It's a feature of Firebase Cloud Messaging.
– saperlipopette
Nov 14 '18 at 14:34
|
show 2 more comments
2
please try with this plugin ionicframework.com/docs/native/fcm
– keval nayak
Nov 14 '18 at 13:41
Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothinghere you're saying that your don't receive your push notification, and here you say that you receive your push notificationIf I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.
– saperlipopette
Nov 14 '18 at 14:14
@saperlipopette I receive notification only if I target specific device (with the button "Test on a device" on firebase). It only work with this "test on a device" button who's not usable to send push to all subscribers...
– Fabien
Nov 14 '18 at 14:21
@kevalnayak, I try to install plugin you suggested, but in the official doc, there is a "backend" var who isn't declared anywhere so i can't compile. Any idea about this ? thank's
– Fabien
Nov 14 '18 at 14:32
As suggested by Keval, you should try to use the FCM plugin instead. AFAIK the push plugin has been made for Google Cloud Messaging, and I'm not sure that broadcasting a notification to an app was supported. It's a feature of Firebase Cloud Messaging.
– saperlipopette
Nov 14 '18 at 14:34
2
2
please try with this plugin ionicframework.com/docs/native/fcm
– keval nayak
Nov 14 '18 at 13:41
please try with this plugin ionicframework.com/docs/native/fcm
– keval nayak
Nov 14 '18 at 13:41
Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothing here you're saying that your don't receive your push notification, and here you say that you receive your push notification If I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.– saperlipopette
Nov 14 '18 at 14:14
Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothing here you're saying that your don't receive your push notification, and here you say that you receive your push notification If I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.– saperlipopette
Nov 14 '18 at 14:14
@saperlipopette I receive notification only if I target specific device (with the button "Test on a device" on firebase). It only work with this "test on a device" button who's not usable to send push to all subscribers...
– Fabien
Nov 14 '18 at 14:21
@saperlipopette I receive notification only if I target specific device (with the button "Test on a device" on firebase). It only work with this "test on a device" button who's not usable to send push to all subscribers...
– Fabien
Nov 14 '18 at 14:21
@kevalnayak, I try to install plugin you suggested, but in the official doc, there is a "backend" var who isn't declared anywhere so i can't compile. Any idea about this ? thank's
– Fabien
Nov 14 '18 at 14:32
@kevalnayak, I try to install plugin you suggested, but in the official doc, there is a "backend" var who isn't declared anywhere so i can't compile. Any idea about this ? thank's
– Fabien
Nov 14 '18 at 14:32
As suggested by Keval, you should try to use the FCM plugin instead. AFAIK the push plugin has been made for Google Cloud Messaging, and I'm not sure that broadcasting a notification to an app was supported. It's a feature of Firebase Cloud Messaging.
– saperlipopette
Nov 14 '18 at 14:34
As suggested by Keval, you should try to use the FCM plugin instead. AFAIK the push plugin has been made for Google Cloud Messaging, and I'm not sure that broadcasting a notification to an app was supported. It's a feature of Firebase Cloud Messaging.
– saperlipopette
Nov 14 '18 at 14:34
|
show 2 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53300814%2ffirebase-fcm-push-notification%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53300814%2ffirebase-fcm-push-notification%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
please try with this plugin ionicframework.com/docs/native/fcm
– keval nayak
Nov 14 '18 at 13:41
Everything compiles right, but when I send notification in Firebase (with or without channel id), I don't receive nothinghere you're saying that your don't receive your push notification, and here you say that you receive your push notificationIf I copy my registrationId in console and try to a send test notification (button "test on a device" in FCM on the first step when I create a new message), this test notification is correctly received.– saperlipopette
Nov 14 '18 at 14:14
@saperlipopette I receive notification only if I target specific device (with the button "Test on a device" on firebase). It only work with this "test on a device" button who's not usable to send push to all subscribers...
– Fabien
Nov 14 '18 at 14:21
@kevalnayak, I try to install plugin you suggested, but in the official doc, there is a "backend" var who isn't declared anywhere so i can't compile. Any idea about this ? thank's
– Fabien
Nov 14 '18 at 14:32
As suggested by Keval, you should try to use the FCM plugin instead. AFAIK the push plugin has been made for Google Cloud Messaging, and I'm not sure that broadcasting a notification to an app was supported. It's a feature of Firebase Cloud Messaging.
– saperlipopette
Nov 14 '18 at 14:34