Pushwoosh / pushwoosh-phonegap-plugin

Pushwoosh PhoneGap Build Plugin
Other
109 stars 139 forks source link

Default Android Icon #234

Closed elloboblanco closed 7 years ago

elloboblanco commented 7 years ago

I have tried a number of things to get this to work but I keep getting a blank white square for my push icon.

  1. writing a hook to copy a pw_notification.png file into every drawable*
  2. passing a path to a local .png file from the Pushwoosh website
  3. doing nothing

What am I doing wrong?

        // Initialize Pushwoosh. This will trigger all pending push notifications on start.
        pushwoosh.onDeviceReady({
          appid: 'ABC-123',       // pushwoosh appid
          projectid: 'really-cool-app'   // GCM "project number"
        });

image

elloboblanco commented 7 years ago

No additional config? This is still not working for me ¯_(ツ)_/¯

Thanks, Will

-- https://locohost.fosteri.zone

On January 2, 2017 at 11:34:02 AM, boynet (notifications@github.com) wrote:

for me putting the pw_notification.png file into app\platforms\android\res\drawable folder worked

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Pushwoosh/pushwoosh-phonegap-plugin/issues/234#issuecomment-270006275, or mute the thread https://github.com/notifications/unsubscribe-auth/ADV3ARvpHF0yaFavLQ7G_8wjvWhszmn7ks5rOUMZgaJpZM4LYxVM .

wfhm commented 7 years ago

Hi,

Could it be that your icon was not created according to Android guidelines?

Please refer to the following guide for additional details:

http://docs.pushwoosh.com/docs/android-faq#how-to-set-a-notification-icon-in-android-lollipop

elloboblanco commented 7 years ago

@wfhm I used sips to verify that I don't have any alpha channels (as per http://stackoverflow.com/a/29178945/277079). Any advice?


$ sips -g all icon.png

  pixelWidth: 1024
  pixelHeight: 1024
  typeIdentifier: public.png
  format: png
  formatOptions: lzw
  dpiWidth: 72.000
  dpiHeight: 72.000
  samplesPerPixel: 3
  bitsPerSample: 8
  hasAlpha: no
  space: RGB
  profile: sRGB IEC61966-2.1
  creation: 2016:09:28 21:55:34
  software: Flying Meat Acorn 5.5.1```
elloboblanco commented 7 years ago

@wfhm oh shoot, maybe that is the problem, Android only displays the alpha channel? Am I understanding this properly?

ggutenberg commented 7 years ago

Pushwoosh documented this - http://docs.pushwoosh.com/docs/android-faq#how-to-set-a-notification-icon-in-android-lollipop

The system ignores all non-alpha channels in action icons and in the main notification icon. Assume these icons will be alpha-only. The system draws notification icons in white and action icons in dark gray. This is beyond Pushwoosh SDK control.