FCM Notification to specific wordpress user


Staff member
i am developping an android application based on a wordpress blog where users can post their own articles, i work with WP REST API to get posts , comments and users ...

I would like to send a notification automatically to the user when his article got a new comment , i have installed FCM correctly and tested the simple forme of notifications but i need to :

<li><strong>Trigger FCM Notification on new comment sent ( Or just on a button click )</strong> </li>
<li><strong>Specify receiver so the notification is sent to logged in user with the right email/username</strong></li>

I thought of

<li>working with setting User Property for every user logged like this : </li>

<em>mFirebaseAnalytics.setUserProperty("user_name_for_notification", "the_username");</em>

<li>Sending notification for all devices then handle it in <em>onMessageReceived</em></li>

but i don't think those are good ideas

So , any ideas where to start

thank you