Skip to content

Including imageUrl in the FCM notification payloads always uses BigPicture #7517

@sudiptosarkar

Description

@sudiptosarkar

Support templating for notifications with images

Currently, in background notifications (at least for Android), if we include the imageUrl, it always sets the style to BigPictureStyle.

It works well when using BigTextStyle, but my notification handler won't fire if the app is killed.

We need a way to specify the Style in the fcm payload somehow, so that if it's present, we can use that instead of assuming the sender meant BigPictureStyle.

How would you use it?

In our app, wherein we have to display notifications with user avatars (of the user whose activity has caused the notification to fire), and when expanding, it shows a huge profile picture of that user, which looks bad not just because we now suddenly have the activity user's face plastered on the screen, but also because that was not the point of the picture. If we can use BigTextStyle, it would look awesome as the profile picture would still be small and would stick to the right like we intend it to.

Even if we override that behavior with our own custom FirebaseMessagingService child class, it won't fire when the app is in a killed state, so we really need that fix here.

P.S. I'm (extremely) new to native app development, so if there's a way that I couldn't find, please point me to it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions