Skip to main content
Inspiring
May 31, 2016
Question

Correct White Notification Icons on Android

  • May 31, 2016
  • 2 replies
  • 4686 views

Hi,

It seems I still cannot set the correct notifications for Andorid in Adobe Air SDK 21.0.0.215

From my understanding in order for this to work we need to supply certain icon sizes as entirely white.

Source from here: Customizing Notifications · OneSignal Push Notification Service Documentation

Starting with Android 5, the OS forces the notification icon to be all white when your app targets Android API 21+. If you don't make a correct small icon, it will most likely be displayed as a solid white square or circle in the status bar.

Android 3.0 and higher

These icons are expected to be entirely white.

  • res/drawable-mdpi-v11/ic_stat_onesignal_default.png 24x24 pixels
  • res/drawable-hdpi-v11/ic_stat_onesignal_default.png 36x36 pixels
  • res/drawable-xhdpi-v11/ic_stat_onesignal_default.png 48x48 pixels
  • res/drawable-xxhdpi-v11/ic_stat_onesignal_default.png 72x72 pixels

In my app_name-app.xml file I can set 36x36, 48x48, 72x72 fine. But as soon as I supply 24x24 it get the follwing error:

Unexpected or unknown element in the application descriptor file.
application.icon.image24x24 is an unexpected element/attribute

When I set the 36x36, 48x48, 72x72 as entirely white icons and test a notification my icon still appears wrong so this makes me feel the 24x24 size is the missing key here (Tested on devices Samsung S7 and S5).

Can we get this fixed so we can supply that size when we package? Or forgive me if I have missed the obvious here.

I hope someone can help. We are now on Android 6+

Related post: Android: Add alternative Icon for notifications
Related feature request: Feature#4060095 - Add custom resources on Android

Thanks

This topic has been closed for replies.

2 replies

Inspiring
June 3, 2016

The native extension that you are using chooses what icons will be displayed. Because you can't specify custom Android resources outside of the extension, it is common to simply retrieve the app's icon on the Android side (not sure which size is returned by default). The smaller icons you specify in your descriptor are never considered for use.

If you have source code for the extension, you could add your icons as resources for the Android side and modify the sources so that the corresponding icons are used for the notification.

If you don't have sources, you could try contacting the developer and ask him to repackage the extension with your icons.

vestaxpdxAuthor
Inspiring
June 4, 2016

Thanks for the info mar.pies I understand a bit more now.

I will contact the developers and see what they say. I think having a custom extension with icons for each one would be a real pain to maintain as I have a few apps.

Do you think Adobe Air will ever allow us to specify our own resources folder and package up?

Inspiring
June 4, 2016

Yes, unfortunately, it's quite inconvenient at the moment. That's why michaelarchbold posted the request #4060095, to let the developers customize the notification icons without having to dig into the extension sources.

There has been no response from Adobe staff so unless there is a sudden interest in the feature it's unlikely it will appear anytime soon.

vestaxpdxAuthor
Inspiring
June 3, 2016

Does anyone have any input on this at all?