Skip to content

Commit

Permalink
Merge pull request #111 from orenkatz/patch-1
Browse files Browse the repository at this point in the history
Add support for Android Channel ID
  • Loading branch information
alex-friedl committed Jun 20, 2019
2 parents 28a5181 + c78a8d9 commit 0ddbfe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const data = {
encoding: '', // apn
badge: 2, // gcm for ios, apn
sound: 'ping.aiff', // gcm, apn
android_channel_id: '', // gcm - Android Channel ID
alert: { // apn, will take precedence over title and body
title: 'title',
body: 'body'
Expand Down Expand Up @@ -284,6 +285,7 @@ The following parameters are used to create a GCM message. See https://developer
body_loc_args: data.locArgs, // Android, iOS
title_loc_key: data.titleLocKey, // Android, iOS
title_loc_args: data.titleLocArgs, // Android, iOS
android_channel_id: data.android_channel_id, // Android
},
}
```
Expand Down Expand Up @@ -316,7 +318,8 @@ _data is the parameter in `push.send(registrationIds, data)`_
body_loc_key: undefined,
body_loc_args: undefined,
title_loc_key: undefined,
title_loc_args: undefined
title_loc_args: undefined,
android_channel_id: undefined
}
```
Expand Down
1 change: 1 addition & 0 deletions src/sendGCM.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const sendGCM = (regIds, data, settings) => {
body_loc_args: data.locArgs, // Android, iOS
title_loc_key: data.titleLocKey, // Android, iOS
title_loc_args: data.titleLocArgs, // Android, iOS
android_channel_id: data.android_channel_id, // Android
};

let custom;
Expand Down

0 comments on commit 0ddbfe2

Please sign in to comment.