phonegap-build/PushPlugin — pull request #356 by burin (2014-10-08 16:56:10+00:00)
Title: Check for various extras keys: default, message, and optional title

This PR includes handling for different types of push payloads. We use this plugin to handle messages sent from Amazon SNS plain text, json, and PushWoosh.

This would make this plugin compatible with those services.

The `message` key is now used for the `ticker` text when a notification arrives.

A `default` key that's sent by Amazon SNS for plain text pushes will be used as the `message` if it's present.

The `title` key is now optional. If not sent, the app name will be used as the `title` text.

---

This is how our app (android) will handle push notifications now.

### SNS "text format": default, no message or title

default = "AA 123 is cancelled"

#### Behavior:

Ticker: "AA 123 is cancelled"

Notification title: "TripCase" (app name)

Notification body: "AA 123 is cancelled"

### SNS JSON: message (by default. can send anything)

message = "AA 123 is cancelled"

#### Behavior:

Ticker: "AA 123 is cancelled"

Notification title: "TripCase" (app name)

Notification body: "AA 123 is cancelled"

### PushWoosh: title key, no message

title = ""AA 123 is cancelled""

#### Behavior:

Ticker: "AA 123 is cancelled"

Notification title: "AA 123 is cancelled"

Notification body: blank
```