Ionic 2 - Sending push notifications to specific devices (Part 1)

Raja Yogan · 18K views · 2017 · 19:44

Open on YouTube

Web developmentSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the step-by-step tutorial they followed when asking about errors that came up while building Ionic and Firebase push notifications.

Recommended by 1 people across 1 different months, 2017 to 2018.

What it is

A 2017 tutorial by Raja Yogan on Ionic 2 that shows how to send Firebase push notifications to individual devices, covering the device-side app code (token storage, FCM plugin). It is part 1 of a series and is paired with a written article and a server-side companion.

What people said

Recommends Yash · 2017-11 · Stack Overflow · on “FCMPlugin is not defined”

I am using ionic 3 and cordova-plugin-fcm 2.1.2. I am trying to using firebase push notification function, and i have followed this tutorial [this video] for my device end program and [LINK] for my serve side. And i have deployed it in a real device, but the notification arrives only once in the notification tray, the first time i log in. After that it stops, only if i delete my messages and pushtoken collection from my database, it will run, which is also once. Then i had try to run it in the browser, but in the console log their was a message of FCMPlugin is not defined. I have tried removing the declare keyword, removing phonegap plugin, used the native ionic plugin, but no luck. Help would be

Cites user3397260 · 2018-01 · Stack Overflow · on “Ionic error: Invalid data, chunk must be a string or buffer, not object”

For the last couple of days i am trying to build and android apk file using Ionic3, Cordova and Firebase. As i am quite new to ionic i am following a specific tutorial found online that is also providing me the source code as well. The link of the tutorial is the following : [this video] and is about sending push notifications to specific devices. I follow the tutorial step by step and it seems to work fine but when i am trying to build an apk file in order to run it on my android device i ma getting the following error: (node:18268) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid data, chunk must be a string or buffer, not object (node:18268) [

Cites vivek sharma · 2018-02 · Stack Overflow · on “Property 'catch' does not exist on type 'PromiseLike<void>”

I'm getting this error in the following code. I'm using ionic3: Property 'catch' does not exist on type 'PromiseLike This is the link to the tutorial [this video] that I am following. This error is showing in the VS Code. This probably some updated syntax I'm not aware of storetoken(t) { this.afd.list(this.firestore).push({ uid: firebase.auth().currentUser.uid, devtoken: t }).then(() => { alert('Token stored'); }) .catch(() => { alert('Token not stored'); }) this.afd.list(this.firemsg).push({ sendername: 'vivek', message: 'hello' }).then(() => { alert('Message stored'); }) .catch(() => { alert('Message not stored'); }) } **This is the entire code for the home.ts file which sends token onto fireba