Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down