How to add notification icons to AIR projects

Hi! I want to add notifications icons for local Push notifications for my game. Does anyone know where should I put the custom notification ions (not the game icon, but small white icons, which are shown in the top panel)?

This list https://documentation.onesignal.com/docs/customize-notification-icons gives the specifications for all the development tools except AIR.

Have you tried putting them here into your AIR SDK ?

AIRSDK\lib\android\lib\resources\captive_runtime\res

The other way is to ‘zip’ them into an existing ANE, where the other ‘res’ items are.

I might try, but the problem is that I have 3 games, so, I might need to switch the icons every time I compile the new game.
As for the second one, I don’t use any ANE to integrate local pushes, I use this with Enhance tool, which injects the calls right inside the APK.

So, for example, now the game project (I work in Flash Develop) has folder icons\android\icons
They are included into the project by the following commands in the .bat file:

set AND_ICONS=icons/android
set ICONS=%AND_ICONS%
call adt -package -target %TYPE%%TARGET% %OPTIONS% %SIGNING_OPTIONS% "%OUTPUT%" "%APP_XML%" %FILE_OR_DIR% -extdir lib/adt

Is there any way like this to add notification icons?

No.
‘res’ files are either added in an ANE or (possibly) in that AIR folder I mentioned.
No way of using adt to do it.

You can try using this project to create a custom resources ANE or send your resources to me and I’ll make one up for you.

1 Like