Icon not shown in notification for Unity3d Android

Comments

9 comments

  • Avatar
    Eliseo Mora

    Hi, have you set up the icon in the administrator panel in the Pushwoosh website?

  • Avatar
    ashwanikumar04

    I think it is not necessary.

  • Avatar
    Eliseo Mora

    For me is working and I have set up that. I didn't made anything inside the Unity project for get the icon in the notitication. I had the icon for generate the APK and that's all.

    I hope that can help.

  • Avatar
    ashwanikumar04

    Ok, where exactly do we need to configure the icon. While sending the push or while creating the application?

  • Avatar
    Eliseo Mora

    In the app creation inside the Pushwoosh panel.

    https://cp.pushwoosh.com/applications/PW-APP-ID/configure

    Where PW APP ID should be your aplication id inside pushwoosh.

    When sending the push notification is for showing an image inside the notification, so you dont need it now.

  • Avatar
    Eliseo Mora

    I have made a push to my lollipop device and i got the icons in the notification.

  • Avatar
    Eliseo Mora

    Hello there, this is happening to me with Unity 4.6 and Android 5.0 and newer. The icon in the top bar appears like a white square. I can send the icon in the push but keeps appearing inside a white square.

    Is this fixed in the latest SDK update?

  • Avatar
    Dheeraj

    Please read this: https://www.pushwoosh.com/programming-push-notification/android/android-faq/#lollipop-icon

    How to set notification icon in Android Lollipop?

    In Android Lollipop icons were changed to be white only. Therefore, if you select targetSdkVersion >= 21 in your AndroidManifest.xml Android will use alpha-channel of the icon only. See more on the behavior in Android documentation.

    The system ignores all non-alpha channels in action icons and in the main notification icon. You should assume that 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.

    However, you can revert this behavior to use old style colored icons: 1. Set targetSdkVersion to 19. This automatically brings the old behavior back.

    OR

    1. Create the notification icon according to the Android guidelines. As per documentation, the system will ignore all the colors. 2.1. Name the icon as pw_notification.png and put it in res/drawable folder. Pushwoosh SDK will use this icon as default for notifications. 2.2. Alternatively, you can use Remote API and set the "android_icon" parameter value to the icon image (without file extension).

    Hope it addresses your question.

Please sign in to leave a comment.