I can succesfully send a post request from my server at home to the Firebase server. The message is delivered to the client without a problem. Except that the app must be either running or in the background. If the app is closed the message goes to limbo. There is nothing in the system tray, there is no sound, nothing. Is this the expected behavior?
This is the curl command I am using:
curl -X POST --header "Authorization: key=AIzaSyBntseBqux9nBX8y" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\":\"fxhL9uQBYUo:APA91bGaEWqTJ2mde1vSlfOZWHYrYTQLbZdFih2hs_wszaxPsthfMN5lnxH6RHquUImmT\",\"data\":{\"action\":\"run\"}}"
Am I missing some extra fields that make the device act like it is doing now?
PS: Server Key and Token are not real.
Your code is sending a data message, the Firebase Notifications console sends notifications messages.
One big difference between these two types of messages is that notification messages are automatically shown in the system notification area if your app is not in the foreground.
See this page in the Firebase documentation explaining the difference between these message types.