richsage / RMSPushNotificationsBundle

NOT MAINTAINED! ⛔️ Push notifications/messages for mobile devices. Supports iOS, Android (C2DM, GCM), Blackberry and Windows Mobile (toast only). A Symfony2 bundle.
MIT License
321 stars 152 forks source link

Response null when sending an Android push notification #158

Open dbuton opened 7 years ago

dbuton commented 7 years ago

I have a problem, when I curl a push notification, it's working but when I try with the bundle, it fails because the message response is equals to NULL.

I'm testing with postman and Post request.

Someone have an idea please?


$androidMessage = new AndroidMessage();
$androidMessage->setMessage($message);
$androidMessage->setDeviceIdentifier($device->getUuid());
$androidMessage->setFCM(true);

$this->notification->send($androidMessage);

This is the response :

object(Buzz\Message\Response)#2513 (5) {
  ["protocolVersion":"Buzz\Message\Response":private]=>
  NULL
  ["statusCode":"Buzz\Message\Response":private]=>
  NULL
  ["reasonPhrase":"Buzz\Message\Response":private]=>
  NULL
  ["headers":"Buzz\Message\AbstractMessage":private]=>
  array(0) {
  }
  ["content":"Buzz\Message\AbstractMessage":private]=>
  NULL
}