No Notification for Data Message
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- firebase, javascript
- Domain
- mobile
Research direction
Start with doc/cloud-messaging.md and reproduce the report using the provided curl request and in-app message handler on iOS 11.1.1 with Tabris.js 3.0.0-beta1. Compare foreground and closed-app behavior, then determine the documented expected handling for data messages and verify that the notification behavior matches it.
Written by the indexing model from the issue text.
Description
Problem description
When I send a 'data' message, no notification is shown if the app isn't open. I took a look at #9, but I'm fairly certain I'm composing the message correctly.
Expected behavior
The documentation states that a 'data' message is "a notification that also delivers its data to the app", so, I would expect a notification to appear.
Environment
- Tabris.js version: 3.0.0-beta1
- Device: iPhone 7
- OS: iOS 11.1.1
Code snippet
In-app Javascript:
/* check to see if app was launched by notification tap */
setTimeout(() => { // workaround for #41
console.log('launchData after timeout: ', firebase.Messaging.launchData);
});
/* handle any messages that arrive */
firebase.Messaging.on('message', ({data}) => {
console.warn('Received message data: ', data)
});
Command Line Notification Composition:
curl -X POST -H "Authorization: key=$key" -H "Content-Type: application/json" -d "{
\"to\": \"$token\",
\"data\": {
\"title\": \"Title\",
\"body\": \"Body\",
\"payload\": \"custom data\"
}
}
" https://fcm.googleapis.com/fcm/send
# Response in terminal: {..."success":1,"failure":0,...}
If the app is open, then the following prints:
Received message data: {payload: 'custom data', title: 'Title', body: 'Body',...}
But if the app is closed, then nothing prints.
- Dominant language
- JavaScript
- Stars
- 6
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipsesource/tabris-plugin-firebase
-
broken linkOpen
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
eclipsesource/tabris-plugin-firebase#76 · 2 comments ·
-
bug ios
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
eclipsesource/tabris-plugin-firebase#65 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
eclipsesource/tabris-plugin-firebase#64 · 1 comment ·
All issues in eclipsesource/tabris-plugin-firebase
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
keyxmakerx/Chronicle#1532 ·
Maintainers usually reply within 1 day
-
enhancement feature good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug lsp sev-3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
学习模式 / 答疑模式在 DSH 0.2.1-rc.2 上必失败:unknown prompt variable "{{cwd}}"Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Miaotofu01/Study-Mate#206 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Uuriko/project-room#3998 ·
Maintainers usually reply within 1 day