If you send push with the notification parameter, then you cannot process using onMessageReceived
If you want to process the notification, send push with the data option, now you can process GCM and onMessageReceived .
Please note: ios processes notifications using the notifications key.
Send push for ios with the notification key, for the android data button.
For android;
{"data":{"message":"hey"}},registration_ids":["device token"]
For ios:
{"notification":{"title":"Hey title", "body":" Hey body"},"to":"device token"}
source share