Changes for README.md: 36 added lines, 0 removed lines.
Original line number
Diff line number
Diff line
@@ -383,6 +383,42 @@ This will produce the following notification in your tray:
If your users clicks on the main body of the notification your app will be opened. However if they click on either of the action buttons the app will open (or start) and the specified JavaScript callback will be executed. In this case it is `app.emailGuests` and `app.snooze` respectively.
### Led in Notifications
You can use a Led notifcation and choose the color of it. Just add a `ledColor` field in your notification in the ARGB format array:
```javascript
{
title:"Green LED",
message:"This is my message with a Green LED",
ledColor:[0,0,255,0]
}
```
### Vibration Pattern in Notifications
You can set a Vibration Pattern for your notifications. Just add a `vibrationPattern` field in your notification:
```javascript
{
title:"Vibration Pattern",
message:"Device should wait for 2 seconds, vibrate for 1 second then be silent for 500 ms then vibrate for 500 ms",
vibrationPattern:[2000,1000,500,500]
}
```
### 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:
```javascript
{
title:"This is a maximum priority Notification",
message:"This notification should appear in front of all others",
priority:2
}
```
### 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 buy sending the following JSON from GCM.