1

I've successfully integrated Firebase Python SDK for Android/iOS notifications. Now I want to send in-app notification using firebase python sdk. I couldn't find any code for this on Firebase official documentation. Here is my code for sending push notification which is working fine.

_message = messaging.Message(
    notification=messaging.Notification(
        title=show_title,
        body=episode_title,
        image=image_url,
    ),
    apns=messaging.APNSConfig(
        payload=messaging.APNSPayload(
            aps=messaging.Aps(
                mutable_content=1
            )
        ),
        fcm_options=messaging.APNSFCMOptions(
            image=image_url
        )
    ),
    token=registration_token,
    data=data,
)

Please do let me know IF somehow I can use Firebase python sdk for in-app notification. Thanks

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
M Usman Wahab
  • 53
  • 1
  • 10

1 Answers1

2

While it is possible to trigger an in-app message programmatically, this can only be done from inside the application. Since there are in-app messages, there is no API to directly trigger them from server-side code.

What you can do is:

  1. send an FCM data message from your Python code to the device,
  2. receive it in your application code on the device, and then
  3. trigger the display of an in-app message through the client-side API.
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807