How can I implement device to device push notifications?

I want device A (foreground) to send a push notification to device B (background).

I've read through the Firebase Cloud Messaging docs and there is no solution for sending an FCM from one client device to another client device. Only from the Firebase Admin to a device.

However it appears it's possible with Google Cloud Functions (why does it only work with Google Cloud Functions?).

If i have to use Google Cloud Functions to implement this then I will – but surely there is another way I can send the push notification directly from my client app to another device (background)?

PS: device A knows the FCM registration token of device B

submitted by /u/GerrardSlippedHahaha [link] [comments]

Read more: reddit.com