How to respond to device that sent message

Good afternoon Koders. I am making a system of two apps that need to communicate with each other. App number 1 is used by clients and has a panic button, when the panic button is pressed the app sends a message to the 2nd app which is used by agents (the message goes to all agent apps which is perfect), the agent who is closer to the victim (I used maps for this) will then respond to the text by also pressing a button called “respond”. Now I am lost because the agent message goes to every client app installed on every phone and I only want the agent to respond to the device that sent the alert in the first place. Is there a way to do this? Once I am able to do this the app will be complete. Thanks in advance.

1 Like

what kind of message are you sending? a sms?

1 Like

Maybe add an ID with the message being sent from the client so when the agent responds, it can go directly to that person and also mark it as responded so other agent don’t respond to the same person.


No it is not an sms, I used the experimental piece which sends notifications.

What should be the ID? Should I use utility tools for this maybe the ID becomes the device_ID? Thanks for your reply

Does your app have a login system? If yes, you could maybe use their username. If no, you could generate an ID using some letters and random numbers.

I will check the notification component to see how it works so I can have a better idea.

1 Like

Yes it does, every user registers the first time they use the app and I already use their username in the main page and their profile page. What you are saying makes sense but I still have to figure out a way to do this.

You know about MLM? if yes then it can help you to create such app…

Hello Alapjeet,
No I don’t know about it. Can you explain what it is or write MLM in full?

Here are my blocks guys, I might be going the wrong way with this. Please help…

multi Level Marketing… In that people generally use to create their team & any message when they shared they only go between that particular team

Oh you are talking about that, I know about it but I don’t see how that relates to my blocks, the concept is the same from the way you explain.

First can you please explain a little about your app. But PM me… don’t increase thread @maila_tseke

i am too building a system of two apps, but i couldn’t find a way to connect them together. can you please tell how did you connect the two apps? thank you .

in onesignal component , u have block called “get player id”

by using this … u can send specific notification to one user " who send the help message

now …

if u are using "onesignal send " extension … u should have block called “send notification by user/player id”

  • use firebase , save the help message with the onesignal player id
  • when someone receive notification and want to respond … he will remark the value in firebase as “finished” , and use the player id stored with it to send a special notification to the one who send the message