Do I need to open the app at least once in order for my phone to receive a push notification?
Asked
Active
Viewed 149 times
0

Doug Stevenson
- 297,357
- 32
- 422
- 441

Keong123
- 117
- 1
- 5
-
you need to run your app at least one time – John Joe Feb 11 '20 at 15:30
2 Answers
0
The must run at least once so it can collect a device ID token and send that to the backend that will send the message. Without that token collected, the app can never receive a message on that device.
Read more about it: What is FCM token in Firebase?

Doug Stevenson
- 297,357
- 32
- 422
- 441
0
Actually you do not need the device token to send/receive the messages.
However, it is required that the user give permission to receive notifications, and that would only happen during runtime. I tested this and can confirm it works. The device token is only used to subscribe users to specific topics, but you can send a message to all users that have your app installed without needing to specify device tokens.

kaiofreis
- 35
- 1
- 4