Hello,
After a lot of effort I have running push notifications v2 plugin into android and ios with fcm. Now i am trying to customize the notifications icon into android. Since android Lollipop (api level 21) the system will use only an alpha-channel of the icon for status bar (https://developer.android.com/about/versions/android-5.0-changes.html#BehaviorNotifications) and I can’t use colors for corona notification icon. That’s because the system will show a white circle or rectangle depending on the design of each icon in the status bar.
After testing some configuration based on documentation i achieved the result i wanted , but only at half. In android with fcm the handler for notification is different depending of the application status. Messages with application in background and foreground are processed differently (documentation here: https://firebase.google.com/docs/cloud-messaging/android/receive). Using the firebase customization parameters for notifications icons i set this in the android project:
\<!-- Set custom default icon. This is used when no icon is set for incoming notification messages. See README(https://goo.gl/l4GJaQ) for more. --\> \<meta-data android:name="com.google.firebase.messaging.default\_notification\_icon" android:resource="@drawable/ic\_stat\_ic\_notification" /\> \<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming notification message. See README(https://goo.gl/6BKBk7) for more. --\> \<meta-data android:name="com.google.firebase.messaging.default\_notification\_color" android:resource="@color/colorAccent" /\>
I could override the default corona icon setup to use the background i wanted for the icon, but this only works when the application is in background or stopped. If i put the application in foreground the application will use the icon i set in corona which can’t have color resulting in a different icon displayed depending of the application status.
It seems to be an issue of the notification v2 plugins. It’s this issue going to be solved? Do I have any other option to customize the icon?, because the corona icon setup it’s not working properly with android api level 21 and later.
Thank you!