phonegap-build/PushPlugin — pull request #20 by motorro (2013-06-20 09:19:59+00:00)
Title: Custom icons, ticker and sound support using pushed message

Hello!

Here is a small modification to Android part to allow for:

* Custom ticker message
* Custom small and large icons (linked together by name)
* Custom notification sound

You can set them serverside like this (using [node-gcm](https://github.com/ToothlessGear/node-gcm)):

```javascript

var payload = {
message:"A message",
msgcnt: 1,
ticker: "A custom ticker",
// notification.mp3 should be put to res.raw
sound: "notification",
// put notification.png to your res.drawable to use custom small icon
// put notification_large.png to set large icon (separate config for it not implemented)
icon: "notification"
};

sendGCM(deviceId, payload, function(){});

function sendGCM(device, payload, result) {
var sender = new gcm.Sender("---GCM Token---");
var registrationIds = [device];

var message = new gcm.Message({
collapseKey: 'collapseId'
});

message.addDataWithKeyValue('message',payload.message || "No message for you...");

if (payload.msgcnt) {
message.addDataWithKeyValue('msgcnt',payload.msgcnt);
}

// Ticker message. App name is used if not passed
if (payload.ticker) {
message.addDataWithKeyValue('ticker',payload.ticker);
}

// Custom ringtone name. Ringtone should be put to res.raw. File extention should be ommited
if (payload.sound) {
message.addDataWithKeyValue('sound',payload.sound);
}

// Custom icon name to set as small icon. Otherwise - app icon used
// If iconName_large is also found in res.drawable that icon is set as large one. Otherwise - app icon used
if (payload.icon) {
message.addDataWithKeyValue('icon',payload.icon);
}

sender.send(message, registrationIds, 4, result);
}
```