Support Topics Documentation Slack YouTube Blog

Retrive data when click notification

I sending data from the first user to the second user by push notification.
I want to return some of the data to the first user when the second user clicks on the notification,
how can I do it?

Hi @saeed_noshadi

I guess the question is more related to Android community rather than Backendless.

However, let me try to help you.
First of all, let’s divide the problem into several small:

  1. you have to pass information about user-1 (at least userObjectId) to user-2
  2. you need to catch when a user tap on the received push notification
  3. notify user-2 once user-1 has taped on the PN

More details for each step

  1. you can attach any data into headers

  2. I believe you will figure out how to implement this in your Android app

  3. once you have objectId of user-2 you have several approaches:

  • you can send a push notification directly to the user-2
  • you can send a pub/sub messaging using RealTime Messaging, you also have an ability to provide any specific data through message header
  • you can change some data in Data Table, and the user-2 can be subscribed on changes of the Data Table
  • you can use API Service

Regards, Vlad

thank you.
i think there is any problem.
I want to send different data to the user No1 for select one of the them
For example, if I have 2 data, two notifications will be sent to user No1
1- i send data by PN to the user No1
2-user No1 catch notifications
3- When user No1 touches a notification, it must return its data And I get them

I don’t want changing data in tables. I just want to submit a few options, and user No1 select one of the thems and retrieve that data to me

changing data in tables is only one of the provided approaches, try to use RT Messaging