I\'m sending Firebase notifications through my own webservice with PHP like below.
$url = \'https://fcm.googleapis.com/fcm/send\';
$fields = array(
I was having problem with FCM on exactly Mi Phone and Huawei phone as well! Turns out that it was not a problem with FCM or your app, but on their device level.
They have device level app settings that disable notifications or even wake lock, so onMessageReceived() is not fired when the message arrives. After I changed the settings (mainly allow notifications & disable battery optimisation for my app), everything works just fine!
Refer to Firebase cloud messaging not received when app in background.