onMessageReceived isn't always called
@kroikie 已经在做这个了。
开始于 2017年11月10日。
评估
这个 Issue 还没有评估数据。
描述
- Android device: Multiple devices
- Android OS version: Multiple OS versions
- Google Play Services version:
- Firebase/Play Services SDK version: 11.4.2
The onMessageReceived method is only called for about 2/3 of the users. It's not because it's in the background because it's a data payload sent from Microsoft Azure, and the method is called for me and the notification displayed when I have the app closed. I know they're reaching the device because I checked the Play Console and they're marked as 'Acknowledged'.
Steps to reproduce:
- Follow the quickstart example and log the onMessageReceived call
- Send a message with a data payload
- See how many of your push notifications are logged
Observed Results:
Only about 2/3 of the notifications end up with a call to onMessageReceived.
Expected Results:
I expected all of the notifications to reach onMessageReceived.
Relevant Code:
<service
android:name=".push.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
public class MyFirebaseMessagingService extends FirebaseMessagingService {
...
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
...
}
- 主要语言
- Kotlin
- 星标
- 9.3k
- 派生
- 7.4k
- 平均合并
- 7 天 9 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/quickstart-android 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
firebase/quickstart-android#2756 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
firebase/quickstart-android#2754 · 5 条评论 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 32/100
firebase/quickstart-android#2668 ·
-
难度 4/5 3-5 天 新手友好度 25/100
firebase/quickstart-android#2663 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
firebase/quickstart-android#1669 · 3 条评论 ·
查看 firebase/quickstart-android 的全部 Issue
相似的 Issue
-
android:plan main:plan packages:learn
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
Needs Triage
难度 2/5 1-3 小时 新手友好度 72/100
ankidroid/Anki-Android#23453 ·
维护者通常 1 天内回复
-
afk-ok area:data-quality importer size:S
难度 2/5 1-3 小时 新手友好度 78/100
enorm-labs/event-junkie#5278 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
bazel-contrib/rules_kotlin#1846 ·
维护者通常 2 天内回复