onMessageReceived isn't always called

Aberta
#372 8 comentários 0 reações 1 responsável Ver no GitHub

@kroikie já está trabalhando nisso.

Desde 10/11/2017.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

api: messaging
  • 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:
  1. Follow the quickstart example and log the onMessageReceived call
  2. Send a message with a data payload
  3. 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) {
...
}
Linguagem predominante
Kotlin
Estrelas
9.3k
Forks
7.4k
Merge médio
7d 9h
PRs com merge (30d)
6

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de firebase/quickstart-android

Todas as issues de firebase/quickstart-android

Issues semelhantes

Mais issues de Kotlin

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.