1

I having a case where I need to receive notification whenever Realtime Database Firebase have new data. When investigate, I found out there are 2 way to do this in client side (mobile app using React Native):

Can someone please tell me what is the difference between 2 way and pros and cons of each way?. The document is not helpful for me about this.

Note:

  • Backend Server written in Java framework Spring boot response function push new data to Realtime Database Firebase.
  • Client side need to receive notification when new data added to Realtime Database Firebase (currently only mobile app written in React Native but I also need to do it for web in the future)
5
  • 1
    You've linked the Admin SDK and Android implementation of the child-added event. There is no significant difference between child-added on various platforms. --- As it stands your question it unclear and will likely be closed. I recommend editing it (there's a link under it), to describe what you are trying to accomplish (and on what platform). Commented Jan 25, 2022 at 14:18
  • @FrankvanPuffelen Thank you, you are right, I had mislead the link. Please check it again to see if it cleary enough. Commented Jan 25, 2022 at 16:55
  • 1
    You are now comparing two completely separate databases: Firestore and Realtime Database. While both are part of Firebase, that's pretty much where the overlap ends. If you want to trigger a Cloud Function from Realtime Database, see firebase.google.com/docs/functions/database-events Commented Jan 25, 2022 at 18:24
  • @Dattq2303 can you please let us know if the above comment helps you? Commented Jan 26, 2022 at 12:49
  • @RajeevTirumalasetty yes it does. I'm trying both way now Commented Jan 27, 2022 at 5:08

1 Answer 1

1

Paraphrasing Frank Van Puffelen's comment as an answer:

Firestore and Realtime databases are two completely separate databases. Though firestore and Realtime database both are part of Firebase. If you want to trigger a cloud function from Real Time database, please follow this documentation. If you want to trigger cloud function from Firestore, please check this documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.