evollu / evollu/react-native-fcm
Notifications on iOS vs Android
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
I did a few notifications test and collected the results below.
There are some inconsistencies with the results and the _readme.md_
For instance, iOS click notification (below) has `aps.category`, not `apns.action_category` (readme.md)
**iOS Foreground**
```
{
body: 'lorem',
collapse_key: 'xxx.xxxxxxxx',
notification: {
sound2: 'default',
title: 'Meeting - Test',
e: '1',
sound: 'default',
body: 'Poll "Test" has ended.',
icon: 'ic_notification',
click_action: 'fcm.ACTION.POLL'
},
from: 'xxxxxxxxxxxxxxx',
finish: [Function: finish]
}
```
**Android Foreground**
```
{
body: 'lorem',
fcm: {
action: 'fcm.ACTION.POLL',
tag: null,
icon: 'ic_notification',
color: null,
body: 'Poll "Test" has ended.',
title: 'Meeting - Test'
},
finish: [Function: finish]
}
```
**iOS Click Notification from Background**
```
{
'gcm.message_id': 'xxx',
body: 'lorem',
_notificationType: 'notification_response',
opened_from_tray: true,
_completionHandlerId: '1D0E1E4D-DAC0-4680-AF59-1777163727FD',
aps: {
alert: {
title: 'Meeting - Test',
body: 'Poll "Test" is now opened for voting.'
},
sound: 'default',
category: 'fcm.ACTION.POLL'
},
finish: [Function: finish]
}
```
**Android Click Notification from Background**
```
{
opened_from_tray: 1,
fcm: {
action: 'fcm.ACTION.POLL'
},
collapse_key: 'xxx.xxxxxxxx',
'google.message_id': 'xxx',
from: 'xxxxxxxxxxxxxxx',
body: 'lorem',
'google.sent_time': 1486013571345,
finish: [Function: finish]
}
```
Just wanted to let you know of my findings 😄
React Native: 0.40
React-native-fcm: latest
iPhone 7 iOS10.2 and OnePlus 3 Android 7
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.