[Firebase Cloud Message Plugin] Do Firebase Notifications still work if application is killed?

Forge Component
(6)
Published on 2018-08-20 by Experts
6 votes
Published on 2018-08-20 by Experts

Attempting to use the Firebase Cloud Messaging Plugin on Android, I got it to work while the application is in Foreground or when it is in background (Notification Center).

However messages don't seem to arrive if the application is killed. Am a bit confused so am unsure if this is expected behavior.

Does this mean that if I want the user to receive the notifications the app must at least be in background? Is there a way that even if the app is not in background that the notification will arrive?

Paolo Alcabao wrote:

Attempting to use the Firebase Cloud Messaging Plugin on Android, I got it to work while the application is in Foreground or when it is in background (Notification Center).

However messages don't seem to arrive if the application is killed. Am a bit confused so am unsure if this is expected behavior.

Does this mean that if I want the user to receive the notifications the app must at least be in background? Is there a way that even if the app is not in background that the notification will arrive?

Anyone with a final answer or conclusion for same.

I too want to know this use-case.

Thanks


assif_tiger wrote:

Paolo Alcabao wrote:

Attempting to use the Firebase Cloud Messaging Plugin on Android, I got it to work while the application is in Foreground or when it is in background (Notification Center).

However messages don't seem to arrive if the application is killed. Am a bit confused so am unsure if this is expected behavior.

Does this mean that if I want the user to receive the notifications the app must at least be in background? Is there a way that even if the app is not in background that the notification will arrive?

Anyone with a final answer or conclusion for same.

I too want to know this use-case.

Thanks


I had a test with Firebase Mobile Plugin

https://www.outsystems.com/forge/Component_Reviews.aspx?ProjectId=4991

The Application received the notification in

- Foreground

- Background

- Even when the Application was completely closed

- Also when App connected to the Internet after disconnectivity, I received the notifications of the respective time when I was disconnected to the Internet.



Assif is right: you're able to receive notifications even if the app is killed. The only "requirement", per se, is that the application is installed and the user is registered to receive notifications on the device with that binary id - that's why if you delete an application and re-install it, you'll need to login and re-register for notifications.

In simple technical terms, it is not application receiving notifications - it's the OS (either Google Services or APNS).

I've had problems in the past that I would not receive notifications if I was connected to a 5GHz wireless network. Others, if I tried to send too many notifications in a short timespan, I would not get them either. For background notifications (silent), the OS usually ignores subsequent requests after a given number has reached.

Cheers!