"firebase functions how to send a notification in android" Code Answer


apparently you are using an old version of the firebase sdk for cloud functions, which is < to version 1.0, but your syntax (onwrite((change, context))) corresponds to version >= 1.0.

the image shows an error on onwrite.event which corresponds to the old syntax (.onwrite((event))) .

you should update the sdk in your project, as follows:

npm install firebase-functions@latest --save
npm install firebase-admin@latest --save-exact

you should also update firebase cli to the latest version:

npm install -g firebase-tools

see this documentation item for all the details.

By Van Du Tran on May 29 2022

Answers related to “firebase functions how to send a notification in android”

Only authorized users can answer the Search term. Please sign in first, or register a free account.