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.
i generated icons here . have icons white text , transparent background. sample screenshot pic of icon
i edited androidmanifest , added
android:icon="@drawable/ic_stat_set" in <application
i tried running project on device, new app icon ic_stat_set being used app launcher.
from console send notification , did receive not icon set.
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
Post a Comment