1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter Firebase FCM notification always a white/grey square rather than the custom...

Discussão em 'Mobile' iniciado por Stack, Outubro 9, 2024 às 14:42.

  1. Stack

    Stack Membro Participativo

    Tried all the advice from Stackoverflow, but didn't make any difference: Put this into the AndroidManifest

    <application
    android:name="io.flutter.app.FlutterApplication"
    android:label="Honest"
    android:icon="@mipmap/ic_launcher">
    <!-- Set custom default icon. This is used when no icon is set for incoming notification messages. -->
    <meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/ic_stat_ic_notification" />
    <!-- Set color used with incoming notification messages. This is used when no color is set for the incoming notification message. -->
    <meta-data
    android:name="com.google.firebase.messaging.default_notification_color"
    android:resource="@color/colorAccent" />
    <activity


    Then tried putting the ic notification in different folders - no difference! And putting the png icon into drawables folder directly... Played with vector and png - nothing works... still the same grey square...

    The res folder looks as follows:

    │ ├── launch_background.xml
    │ └── orange_tick.xml

    ├── drawable-hdpi
    │ ├── ic_stat_ic_notification.png
    │ └── ic_stat_notification.png

    ├── drawable-mdpi
    │ ├── ic_stat_ic_notification.png
    │ └── ic_stat_notification.png

    ├── drawable-xhdpi
    │ ├── ic_stat_ic_notification.png
    │ └── ic_stat_notification.png

    ├── drawable-xxhdpi
    │ ├── ic_stat_ic_notification.png
    │ └── ic_stat_notification.png

    ├── drawable-xxxhdpi
    │ ├── ic_stat_ic_notification.png
    │ └── ic_stat_notification.png

    ├── mipmap-hdpi
    │ └── ic_launcher.png
    ├── mipmap-mdpi
    │ └── ic_launcher.png
    ├── mipmap-xhdpi
    │ └── ic_launcher.png
    ├── mipmap-xxhdpi
    │ └── ic_launcher.png
    ├── mipmap-xxxhdpi
    │ └── ic_launcher.png
    └── values
    ├── colors.xml
    ├── strings.xml
    └── styles.xml


    Anyone spots what I'm doing wrong that it doesn't work would be super!!

    Flutter doctor all clean, the android device is a Ulefone Power 2 with Android 7.0 if that makes any difference...

    Continue reading...

Compartilhe esta Página