change push notification icon in status bar



  • the push notification icon is grey color in status bar for Android version 6 or above. I don’t know what will be for Android version 5.

    I’ve read about icon change as below

    • Add noticon.png to ./platforms/android/ant-build/res/drawable/

    Unfortunately, for security issue, Monaca has no such directory released for its users. Is there other way to change push notification icon?

    Thanks.



  • @志杰張 You should be able to use:

    .notification{
    background-color:  green !important;
    }
    

    http://components2.onsen.io/



  • not css … when app receives push notification, the icon displays on top of left side on the screen.
    please see the photo, grey one should be changed to color one.

    0_1471273996717_appIcon.jpg

    Thanks



  • @志杰張 I see now what you are referencing. For me, I use the following plugins which allow much more control over the whole process:

    For remote:

    https://github.com/phonegap/phonegap-plugin-push

    For local:

    https://github.com/katzer/cordova-plugin-local-notifications

    These allow significant control over icons, stacking, background services, etc.

    EDIT: Also, that folder just needs to be added to your platforms folder, because it is there when you build. If you use LocalKit or Cloud IDE, under Build Config -> Android App Settings: you can add your icons with the appropriate resolution. You may be able to upload the noticon at the same time.


Log in to reply