• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Correct White Notification Icons on Android

Explorer ,
May 31, 2016 May 31, 2016

Copy link to clipboard

Copied

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).

white_icon_problem_1.jpg

white_icon_problem_2.jpg

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

TOPICS
Development

Views

4.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Does anyone have any input on this at all?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

Cool thanks for clearing things up

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

If you need a hand adding custom resources I can create an ANE for you that will package the icons correctly. You just need to create your icons using the Android asset studio:

https://romannurik.github.io/AndroidAssetStudio/icons-notification.html#source.space.trim=1&source.s...

Make sure the name used there matches the resource name one signal needs (ic_stat_onesignal_default)

Then send me the zip (airnativeextensions@distriqt.com) and I'll put together an ANE that you'll just need to package with your app.

I'm in process of putting documentation together to show you how to do this yourself but in the meantime happy to knock it up for you.

Cheers

air native extensions // https://airnativeextensions.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 06, 2016 Jun 06, 2016

Copy link to clipboard

Copied

LATEST

Wow thanks Michaeal, I will get in touch.

Cheers

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines