Trying to setup Huawei push in a flutter app and encountered some problems when app is not running.
The push is received when app is running in front and background. but when it is killed, it does not receive push or sometimes not real-time or not until app is reopened.
what could be missing in here?
When the app runs in background or app process is killed, the onMessageReceivedStream handler will not be called when receiving data messages.
Instead, you need to set up a background callback handler via the registerBackgroundMessageHandler method.
To set up a background handler, call registerBackgroundMessageHandler outside of your app logic as early as possible.
for example sample code :
also, double-check base integration steps in the link: