0

I would like to send notifications to another device number after completion of certain process by current device. e.g. If A user completes the operation then B will get notification.

I am maintaing Realtime database by having all mobile numbers with unique ids.like below:

        rootNode = FirebaseDatabase.getInstance();
        reference = rootNode.getReference("Logins");
        String id = reference.push().getKey();
        reference.child(id).setValue(mobile);

and data is:

cofy-ac782-default-rtdb
    ->Logins
      -> -M_1PKZ6x-mLQQ22zoFM: "888886666699"
      -> -M_1PeRIIsM3QGuwmelW: "888886666790"

Above two are two users having these mobiles. So, I would like to send notifiction from first user to second.

I am bit confused, if i would be able to use this data for notification using Cloud messaging. Is it possible that i refer this database and send generate push notifications?

Help is appreciated.

Regards, PD

user15226396
  • 99
  • 2
  • 8
  • 1
    If you consider at some point in time to try using [Cloud Firestore](https://firebase.google.com/docs/firestore/), I have explained in one of my tutorials step by step, how you can send **[notifications](https://www.youtube.com/watch?v=6RzB4HXzQyA&t=3s&list=PLn2n4GESV0AmXOWOam729bC47v0d0Ohee&index=17)** to specific users using Node.js. You can also take a look at my answer from this **[post](https://stackoverflow.com/questions/48298993/push-notifications-on-content-change/48299840)**. – Alex Mamo May 07 '21 at 08:39

1 Answers1

1

You must refer to firebase functions that will help you to send notification to specific person when UserA complete some task and your realtime database gets update at that moment firebase functions will do the rest.

For Firebase functions you must have little knowledge of Node.Js.

Refer to this link.

Harsh Suvagiya
  • 106
  • 1
  • 3