简体   繁体   中英

Phonegap Push Notification - Status Bar Icon

I am probably just missing some super simple setting somewhere. But I cannot figure this out.

I have a phonegap app (currently just android) with push notifications. I am able to send, and the application is visible both after the notification has been received and if you pull down the status bar.

But when the push notification is first received its a solid blue box.Then it goes to the application icon.

Any ideas how to set (or remove) the initial notification icon and defer to the application icon?

I've tried every setting google could find to no avail.

Thanks!

Example Push Payload

{
"priority" : "normal",
  "notification" : {
    "body" : "yay new notification stuff here",
    "title" : "hay notification!",
    "icon" : "new"
  }
}

Example Plugin Setup

https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/EXAMPLES.md

Phonegap Build - PGB

Here's what I did to fix it (Sizes may need some manipulation, but it gets the icon there) .

Config.xml

<preference name="android-targetSdkVersion" value="20" />
<icon src="icon.png" />
<icon src="res/icon-36-ldpi.png"   gap:platform="android"    gap:qualifier="ldpi" />
<icon src="res/icon-48-mdpi.png"   gap:platform="android"    gap:qualifier="mdpi" />
<icon src="res/icon-72-hdpi.png"   gap:platform="android"    gap:qualifier="hdpi" />
<icon src="res/icon-96-xhdpi.png"  gap:platform="android"    gap:qualifier="xhdpi" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM