firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Including imageUrl in the FCM notification payloads always uses BigPicture

Open sudiptosarkar opened this issue 1 month ago • 1 comments

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.

sudiptosarkar avatar Oct 29 '25 13:10 sudiptosarkar

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Oct 29 '25 13:10 google-oss-bot