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 天內回覆