zetavg / react-native-system-notification

Android system notifications for React Native. Supports push notifications with GCM integrated.
https://www.npmjs.com/package/react-native-system-notification
244 stars 102 forks source link

smallIcon problem #4

Closed joa-queen closed 8 years ago

joa-queen commented 8 years ago

Hi, is there any limitation/format for small icons? I'm trying to display my own, but I can only seem to get the default info icon.

cpsiaki commented 8 years ago

I'm having the same problem

zetavg commented 8 years ago

It works for me here, as I put the ic_custom_icon.png in android/app/src/main/res/* (same as ic_launcher) then run:

Notification.create({
  subject: 'Hi',
  smallIcon: 'ic_custom_icon'
});

Then I got: 12575974_10204166384399402_1207624486_n

I guess this problem may be related to the Android version, may you help to provide further info that I can check it out?

cpsiaki commented 8 years ago

does the file need to be a certain size/color?

zetavg commented 8 years ago

I placed the same icon with same sizes in android/app/src/main/res/mipmap-hdpi, android/app/src/main/res/mipmap-mdpi, android/app/src/main/res/mipmap-xhdpi and /Users/Neson/Projects/Colorgy/ColorgyRNApp/android/app/src/main/res/mipmap-xxhdpi.

The color doesn't matter, but it's usually white due to the design on android.

zetavg commented 8 years ago

Closing this for the reason that I think this problem is about Android system design, not a bug of this RN package ;)