Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
Issue #1155: [doc] Explain usage of the top level "priority" in GCM n…
Browse files Browse the repository at this point in the history
…otifications
  • Loading branch information
macdonst committed Sep 9, 2016
1 parent 4327612 commit ddaf48e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/PAYLOAD.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ service.send(message, { registrationTokens: [ deviceID ] }, function (err, respo

## Priority in Notifications

You can set a priority parameter for your notifications. Just add a `priority` field in your notification. -2: minimum, -1: low, 0: default , 1: high, 2: maximum priority:
You can set a priority parameter for your notifications. This priority value determines where the push notification will be put in the notification shade. Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification. Add a `priority` field in your notification. -2: minimum, -1: low, 0: default , 1: high, 2: maximum priority.

```javascript
{
Expand Down Expand Up @@ -736,6 +736,8 @@ service.send(message, { registrationTokens: [ deviceID ] }, function (err, respo
});
```

Do not confuse this with the GCM option of setting the [delivery priority of the message](https://developers.google.com/cloud-messaging/concept-options#setting-the-priority-of-a-message). Which is used by GCM to tell the device whether or not it should wake up to deal with the message.

## Picture Messages

Perhaps you want to include a large picture in the notification that you are sending to your users. Luckily you can do that too by sending the following JSON from GCM.
Expand Down

0 comments on commit ddaf48e

Please sign in to comment.