0

I just created an app in android that contains the main activity and three fragments of the user rescuer and the sponsoring. the fragments open in the main activity according to his registration and signup. but I need to send a notification to the rescuers when the user is in danger but when I am running the app the notification is appearing for all the three sponsorer rescuers and users as well? what to do and how can I achieve this that when the user clicks the button for help only the rescuer fragment gets the notification te notification is visible when the app is in the foreground but not wen in the background

  • https://stackoverflow.com/questions/37700995/how-to-send-notification-to-specific-users-with-fcm – Darshan Mar 13 '21 at 05:17

1 Answers1

1

you need to manage all ids for sponsorer rescuers and users when you push notification pass particular user id and check user id in notification manager service and then call pages.