diff --git a/src/Notification.php b/src/Notification.php index 812444d..6b947cd 100644 --- a/src/Notification.php +++ b/src/Notification.php @@ -86,6 +86,20 @@ public function setColor($color) return $this; } + /** + * android only: urgent notification display + * + * @param int $id + * + * @return \paragraph1\phpFCM\Notification + */ + public function setAndroidChannelId($id) + { + $this->android_channel_id = $id; + return $this; + } + + /** * android/ios: what should happen upon notification click. when empty on android the default activity * will be launched passing any payload to an intent. @@ -156,6 +170,9 @@ public function jsonSerialize() if ($this->tag) { $jsonData['tag'] = $this->tag; } + if ($this->android_channel_id) { + $jsonData['android_channel_id'] = $this->android_channel_id; + } return $jsonData; }