firebase / firebase/firebase-android-sdk

[Messaging] Make BigPictureStyle optional behaviour

Open
#5,086 1 comment 1 reaction 0 assignees View on GitHub
api: messaging type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 23h
Merged PRs (30d)
34

Description

## What feature would you like to see?

Currently when setting the `image` property on the [Notification object](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#Notification), the image is [shown unconditionally](https://github.com/firebase/firebase-android-sdk/blob/master/firebase-messaging/src/main/java/com/google/firebase/messaging/DisplayNotification.java#L147) using the `BigPictureStyle` notification style.

Having some kind of API to either disable or change this behaviour is a requirement for us.

Currently we have to resort to [patching](https://github.com/getdelta/firebase-android-sdk/commit/0e452d9a3814e0fc75c9323f4866cd43c8bae52f) the Firebase library at buildtime, which is not an ideal nor maintainable situation.

## How would you use it?

We would use this feature by disabling the `BigPictureStyle` and showing the image only as a smaller icon, not a full picture.

## Notes

On iOS we have to use a similar hack, but this is more maintainable as iOS provides a nicer way to hook into manipulating the notification before it is shown. So if this would get implemented on Android, having something similar on iOS would be nice as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.