arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1k stars 1.55k forks source link

Large Icon in foreground data message #1145

Closed maksymov closed 4 years ago

maksymov commented 4 years ago

Describe the bug When I send a data-message in foreground, I see a large icon with my app icon. But google recommendation about this icon:

Large icon set using the setLargeIcon () element (optional). It is usually used for contact photos. Don't place the app icon here.

To Reproduce Steps to reproduce the behavior:

data_message = {
        "notification_foreground": "true",
        "notification_title": subject,
        "notification_body" : message[:100],
        'notification_android_icon': 'ic_stat_avex_logo',
        'notification_android_color': '#FF336699',
        "datetime" : "date and time",
        "author" : "Author of comment",
        "rep_id" : "Report_id"
    }
push_service.notify_single_device(
        registration_id=feedback_token,
        data_message=data_message,
        message_title=subject,
        message_body=message[:100] )

Expected behavior LargeIcon should be empty, like when background message.

Screenshots screenshot

Console Logs No error logs

Plugin Version

cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-firebasex 8.1.1 "Google Firebase Plugin"
cordova-plugin-vibration 2.1.6 "Vibration"
cordova-plugin-whitelist 1.3.4 "Whitelist"

Smartphone (please complete the following information):