android - FCM Notification icon is not being used -


i using fcm , send push notification app. want use custom notification icon show white icon. running lollipop.

from documentation says

icon optional, string indicates notification icon. sets value myicon drawable resource myicon.

( i'm not sure means ). here did.

  1. i generated icons here . have icons white text , transparent background. sample screenshot pic of icon enter image description here

  2. i added res folder enter image description here

  3. i edited androidmanifest , added android:icon="@drawable/ic_stat_set" in <application

  4. i tried running project on device, new app icon ic_stat_set being used app launcher.

  5. from console send notification , did receive not icon set.

  6. i tried sending through api. did received notification not icon set.

    curl -x post --header "authorization: key=serverkey" --header "content-type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\":\"registeration-token-id\",\"notification\":{\"body\":\"yellow\" , \"icon\" : \"ic_stat_set\"} \"priority":\"10"}"

update : drawable icons files https://drive.google.com/open?id=0b5fi1l7ebq_boerumznuqy1owxm

do have put in custom data files in console ? icon ? missing ?

thanks

i think might icon size status bar off

take here.

https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html

your app icon should different notification icon.

the icon param in notification status bar.

the icon param in manifest app icon(shortcut)

i recommend sample


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -