I have an app that needs to send data (single integer) to another phone which has the same app. This data would pop up as a notification on the other phone.
I have been able to use FCM to send notifications to the app by using the console. However, I do that manually by sending the message. I now need to send data from the app itself to the same app on the other phone. I was not able to figure out how FCM can do this in the documentation.
I realize that I need to some how get the tokens from one phone's app and have the other app listen for any notification. The tokens are pretty large, so I don't think I should get the user to type in the tokens to listen for notifications from the other app. How can I achieve my goal?