1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Issue with Data-Only Push Notifications Displaying in FCM

Discussão em 'Python' iniciado por Stack, Setembro 12, 2024.

  1. Stack

    Stack Membro Participativo

    I'm using FCM to send push notifications to mobile devices with a Python backend, specifically using the firebase_admin library. I'm sending both data-only and notification messages. Here are the examples:

    For data-only push:

    message = messaging.MulticastMessage(
    data=context,
    tokens=tokens
    )


    For push with notification:

    message = messaging.MulticastMessage(
    data=context,
    notification=messaging.Notification(
    title=title,
    body=body
    ),
    tokens=tokens
    )


    The problem is that data-only pushes should not be displayed, but some of them are being displayed while others are not. This inconsistency is occurring even though I'm using the same method to send them and testing on the same device.

    Has anyone encountered a similar issue?

    Continue reading...

Compartilhe esta Página