APNSMessage class

Specifies the settings for a one-time message that's sent directly to an endpoint through the APNs (Apple Push Notification service) channel.

Constructors

APNSMessage({String? aPNSPushType, Action? action, int? badge, String? body, String? category, String? collapseId, Map<String, String>? data, String? mediaUrl, String? preferredAuthenticationMethod, String? priority, String? rawContent, bool? silentPush, String? sound, Map<String, List<String>>? substitutions, String? threadId, int? timeToLive, String? title, String? url})

Properties

action Action?
The action to occur if the recipient taps the push notification. Valid values are:
final
aPNSPushType String?
The type of push notification to send. Valid values are:
final
badge int?
The key that indicates whether and how to modify the badge of your app's icon when the recipient receives the push notification. If this key isn't included in the dictionary, the badge doesn't change. To remove the badge, set this value to 0.
final
body String?
The body of the notification message.
final
category String?
The key that indicates the notification type for the push notification. This key is a value that's defined by the identifier property of one of your app's registered categories.
final
collapseId String?
An arbitrary identifier that, if assigned to multiple messages, APNs uses to coalesce the messages into a single push notification instead of delivering each message individually. This value can't exceed 64 bytes.
final
data Map<String, String>?
The JSON payload to use for a silent push notification. This payload is added to the data.pinpoint.jsonBody object of the notification.
final
hashCode int
The hash code for this object.
no setterinherited
mediaUrl String?
The URL of an image or video to display in the push notification.
final
preferredAuthenticationMethod String?
The authentication method that you want Amazon Pinpoint to use when authenticating with APNs, CERTIFICATE or TOKEN.
final
priority String?
para>5 - Low priority, the notification might be delayed, delivered as part of a group, or throttled. /listitem>
final
rawContent String?
The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
silentPush bool?
Specifies whether the notification is a silent push notification. A silent (or background) push notification isn't displayed on recipients' devices. You can use silent push notifications to make small updates to your app, or to display messages in an in-app message center.
final
sound String?
The key for the sound to play when the recipient receives the push notification. The value for this key is the name of a sound file in your app's main bundle or the Library/Sounds folder in your app's data container. If the sound file can't be found or you specify default for the value, the system plays the default alert sound.
final
substitutions Map<String, List<String>>?
The default message variables to use in the notification message. You can override these default variables with individual address variables.
final
threadId String?
The key that represents your app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.
final
timeToLive int?
The amount of time, in seconds, that APNs should store and attempt to deliver the push notification, if the service is unable to deliver the notification the first time. If this value is 0, APNs treats the notification as if it expires immediately and the service doesn't store or try to deliver the notification again.
final
title String?
The title to display above the notification message on the recipient's device.
final
url String?
The URL to open in the recipient's default mobile browser, if a recipient taps the push notification and the value of the Action property is URL.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited