firebasefirebase-cloud-messaginggoogle-cloud-functionsgoogle-cloud-firestore

How can I work with FCM using Cloud Firestore?


I'm not able to find any Specific platform where I can use Firebase cloud Messaging with Cloud Firestore into my Android app.

Should I use Cloud functions and send through topics or is there any way to do it in the app itself using queries in Cloud Firestore.


Solution

  • There is no direct connection from Cloud Firestore (a NoSQL database) to Cloud Messaging. If you want to send messages between users of your app using FCM, and use Cloud Firestore in some way for sending those messages, you will have to write your own code to tie those products together.

    A few handy starting points for this:

    While both of these were written for the Firebase Realtime Database, the same approach will work with Cloud Firestore.