Most of the information in this thread is wrong.
Assuming that you followed the tutorial correctly and are using the B4J code to send the messages, notifications will arrive even when the service is not running.
It is true that on some devices, explicitly killing the app will prevent it, but on most devices it will work properly.
Well, I'm starting from the original Fcm example published in 2019, which I will call app X
I am using the attached B4J program to send notifications
I verified that if the X app is turned off by the operator, then the notifications are no longer received, at least on a Samsung A10 phone with Android ver 10
I have 30 identical phones on which to activate a system that allows me to start my main app from a command sent from a pc
I thought fcm notifications were the safest system, because the only one that allows you to communicate even with the phone at rest and display off Unfortunately this is not the case, At least on the Samsung A10, because if the operator turns off the X app that receives commands via fcm, from that moment on I can no longer send commands to the phone when it is at rest and the display is off.
The question is: how to ensure that the X app keeps working even after an attempted shutdown by the operator?
Is it possible to intercept the closing request, whether it comes from manual operation or from the operating system, to start X2 app (which will do the same things as X)?