Device to device Firebase cloud messaging 📱 📲
Send push notification device to device without server directly

Hi, this time I will share an interesting tutorial about firebase cloud messaging.
Usually, we send a notification using FCM, it has to go through the server then the server will send it to the destination device.
It takes a long time, so there is more cost to incur
More or less like the following picture

In this opportunity, I have the source code for how to send notifications directly from device to other device directly
You have to fill in the server key from firebase and change it to the code above. If you want to read full code, you can visit my github repository