Builder for creation of options used by FCM
Class OptionsBuilder
- Class name: OptionsBuilder
- Namespace: LaravelFCM\Message
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setCollapseKey(String $collapseKey)
This parameter identifies a group of messages A maximum of 4 different collapse keys is allowed at any given time.
- Visibility: public
- $collapseKey String
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setPriority(String $priority)
Sets the priority of the message. Valid values are "normal" and "high." By default, messages are sent with normal priority
- Visibility: public
- $priority String
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setContentAvailable(boolean $contentAvailable)
support only Android and Ios
An inactive client app is awoken. On iOS, use this field to represent content-available in the APNS payload. On Android, data messages wake the app by default. On Chrome, currently not supported.
- Visibility: public
- $contentAvailable boolean
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setDelayWhileIdle(boolean $delayWhileIdle)
When this parameter is set to true, it indicates that the message should not be sent until the device becomes active.
- Visibility: public
- $delayWhileIdle boolean
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setTimeToLive(integer $timeToLive)
This parameter specifies how long the message should be kept in FCM storage if the device is offline
- Visibility: public
- $timeToLive integer - <p>(in second) min:0 max:2419200</p>
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setRestrictedPackageName(string $restrictedPackageName)
This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.
- Visibility: public
- $restrictedPackageName string
\LaravelFCM\Message\OptionsBuilder LaravelFCM\Message\OptionsBuilder::setDryRun(boolean $isDryRun)
This parameter, when set to true, allows developers to test a request without actually sending a message.
It should only be used for the development
- Visibility: public
- $isDryRun boolean
null|string LaravelFCM\Message\OptionsBuilder::getCollapseKey()
Get the collapseKey
- Visibility: public
null|string LaravelFCM\Message\OptionsBuilder::getPriority()
Get the priority
- Visibility: public
boolean LaravelFCM\Message\OptionsBuilder::isContentAvailable()
is content available
- Visibility: public
boolean LaravelFCM\Message\OptionsBuilder::isDelayWhileIdle()
is delay white idle
- Visibility: public
null|integer LaravelFCM\Message\OptionsBuilder::getTimeToLive()
get time to live
- Visibility: public
null|string LaravelFCM\Message\OptionsBuilder::getRestrictedPackageName()
get restricted package name
- Visibility: public
boolean LaravelFCM\Message\OptionsBuilder::isDryRun()
is dry run
- Visibility: public
\LaravelFCM\Message\Options LaravelFCM\Message\OptionsBuilder::build()
build an instance of Options
- Visibility: public