ExpoMessage
in package
Table of Contents
- $badge : mixed
- $body : mixed
- $data : mixed
- $priority : mixed
- $sound : mixed
- $subtitle : mixed
- $title : mixed
- __construct() : mixed
- Constructor
- badge() : $this
- Number to display in the badge on the app icon. Specify zero to clear the badge.
- body() : $this
- The message to display in the notification
- create() : static
- Create a message with given body.
- data() : $this
- A JSON object delivered to your app.
- disableSound() : $this
- Play a sound when the recipient receives this notification.
- priority() : $this
- The delivery priority of the message.
- subtitle() : $this
- The subtitle to display in the notification below the title.
- title() : ExpoMessage
- Set title to display in the notification. Often displayed above the notification body
- toArray() : array<string|int, mixed>
- Get an array representation of the message.
Properties
$badge
protected
mixed
$badge
= 0
$body
protected
mixed
$body
$data
protected
mixed
$data
$priority
protected
mixed
$priority
= 'default'
$sound
protected
mixed
$sound
= "default"
$subtitle
protected
mixed
$subtitle
$title
protected
mixed
$title
Methods
__construct()
Constructor
public
__construct([string $body = '' ]) : mixed
Parameters
- $body : string = ''
Return values
mixed —badge()
Number to display in the badge on the app icon. Specify zero to clear the badge.
public
badge(string $badge) : $this
iOS
Parameters
- $badge : string
Return values
$this —body()
The message to display in the notification
public
body(string $body) : $this
iOS and Android
Parameters
- $body : string
Return values
$this —create()
Create a message with given body.
public
static create([string $body = '' ]) : static
Parameters
- $body : string = ''
Return values
static —data()
A JSON object delivered to your app.
public
data(array<string|int, mixed> $data) : $this
Maxsize 4KiB
iOS and Android
Parameters
- $data : array<string|int, mixed>
Return values
$this —disableSound()
Play a sound when the recipient receives this notification.
public
disableSound() : $this
Specify "default" to play the device's default notification sound, or omit this field to play no sound. Custom sounds are not supported.
iOS
Return values
$this —priority()
The delivery priority of the message.
public
priority(string $priority) : $this
Specify "default" or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS).
iOS and Android
Parameters
- $priority : string
-
"default" | "normal" | "high"
Return values
$this —subtitle()
The subtitle to display in the notification below the title.
public
subtitle(string $subtitle) : $this
iOS
Parameters
- $subtitle : string
Return values
$this —title()
Set title to display in the notification. Often displayed above the notification body
public
title(string $title) : ExpoMessage
iOS and Android
Parameters
- $title : string
Return values
ExpoMessage —toArray()
Get an array representation of the message.
public
toArray() : array<string|int, mixed>