Closed YosefOberlander closed 2 years ago
When using ->setAndroid as shown the readme, the notification does not send.
Using it this way works fine.
return FcmMessage::create() ->setData(['data1' => 'value', 'data2' => 'value2']) ->setNotification(\NotificationChannels\Fcm\Resources\Notification::create() ->setTitle('Account Activated') ->setBody('Your account has been activated.') ->setImage('http://example.com/url-to-image-here.png'));
Using it this way does not work.
return FcmMessage::create() ->setData(['data1' => 'value', 'data2' => 'value2']) ->setNotification(\NotificationChannels\Fcm\Resources\Notification::create() ->setTitle('Account Activated') ->setBody('Your account has been activated.') ->setImage('http://example.com/url-to-image-here.png')) ->setAndroid( AndroidConfig::create() ->setFcmOptions(AndroidFcmOptions::create()->setAnalyticsLabel('analytics')) ->setNotification(AndroidNotification::create()->setColor('#0A0A0A'));
Happy to look over a PR that can correct this behaviour.
When using ->setAndroid as shown the readme, the notification does not send.
Using it this way works fine.
return FcmMessage::create() ->setData(['data1' => 'value', 'data2' => 'value2']) ->setNotification(\NotificationChannels\Fcm\Resources\Notification::create() ->setTitle('Account Activated') ->setBody('Your account has been activated.') ->setImage('http://example.com/url-to-image-here.png'));
Using it this way does not work.
return FcmMessage::create() ->setData(['data1' => 'value', 'data2' => 'value2']) ->setNotification(\NotificationChannels\Fcm\Resources\Notification::create() ->setTitle('Account Activated') ->setBody('Your account has been activated.') ->setImage('http://example.com/url-to-image-here.png')) ->setAndroid( AndroidConfig::create() ->setFcmOptions(AndroidFcmOptions::create()->setAnalyticsLabel('analytics')) ->setNotification(AndroidNotification::create()->setColor('#0A0A0A'));