Push Notification Icons - Android

I have included the following push icon files into my top level. when I do “build” it says Build Error #12 “Missing required file: IconNotificationDefault-xhdpi-v4.png” what does that mean?

IconNotificationDefault-mdpi-v9.png

IconNotificationDefault-mdpi-v11.png

IconNotificationDefault-hdpi-v9.png

IconNotificationDefault-hdpi-v11.png

IconNotificationDefault-xhdpi-v9.png

IconNotificationDefault-xhdpi-v11.png

IconNotificationDefault-xxhdpi-v9.png

IconNotificationDefault-xxhdpi-v11.png

IconNotificationDefault-xxxhdpi-v9.png

IconNotificationDefault-xxxhdpi-v11.png

I added;

IconNotificationDefault-ldpi-v9.png

IconNotificationDefault-ldpi-v11.png

but same error.

I don’t see where you’re including the v4 icon…

Rob

This error is happening because you are missing the *unversioned* notification icons needed for Android 2.x.

  • IconNotificationDefault-ldpi.png

  • IconNotificationDefault-mdpi.png

  • IconNotificationDefault-hdpi.png

  • IconNotificationDefault-xhdpi.png

Have a look at our documentation via the link below.  You need to add *all* of the PNGs listed there.

   https://docs.coronalabs.com/guide/events/appNotification/index.html#android-icons

Should the v4 icons be colour? Sadly the guide doesn’t mention v4 at all. Only unversioned, v9 and v11? 

I have unversioned, v9, v11 and Icon-xxxhdpi.png for my android app. 

Do I also need: IconNotificationDefault-xxxhdpi-v4.png (along with other sizes)?

Thanks

No.  You do not need to create any v4 icons.  You only need to create the icons mentioned in the icon.  I’m 100% positive on this.  The documentation is correct.

   https://docs.coronalabs.com/daily/guide/events/appNotification/index.html#android-icons

I fear you’re wrong Joshua

Look at my list of files and terminal output.

Thoughts?

I’m not wrong.

Google’s Android SDK build system renames your unversioned icon files to “-v4” files when bundling them into the APK.

Trust me on this.  I’m one of the Android developers here at Corona Labs.  :slight_smile:

You make a good point! - Any idea why this is still erroring with Error 256 then when I build using those files in the screenshots?

You’re missing an “Icon-hdpi.png” file, which is an app icon file, not a notification icon file.

If you include at least 1 icon file in your project directory, then you have to include the entire DPI set or else a build error will occur.  We made it this way on purpose to ensure that none of our default Corona DPI icons will appear in your app.

Joshua, thank you. That’s sorted me. 

I added;

IconNotificationDefault-ldpi-v9.png

IconNotificationDefault-ldpi-v11.png

but same error.

I don’t see where you’re including the v4 icon…

Rob

This error is happening because you are missing the *unversioned* notification icons needed for Android 2.x.

  • IconNotificationDefault-ldpi.png

  • IconNotificationDefault-mdpi.png

  • IconNotificationDefault-hdpi.png

  • IconNotificationDefault-xhdpi.png

Have a look at our documentation via the link below.  You need to add *all* of the PNGs listed there.

   https://docs.coronalabs.com/guide/events/appNotification/index.html#android-icons

Should the v4 icons be colour? Sadly the guide doesn’t mention v4 at all. Only unversioned, v9 and v11? 

I have unversioned, v9, v11 and Icon-xxxhdpi.png for my android app. 

Do I also need: IconNotificationDefault-xxxhdpi-v4.png (along with other sizes)?

Thanks

No.  You do not need to create any v4 icons.  You only need to create the icons mentioned in the icon.  I’m 100% positive on this.  The documentation is correct.

   https://docs.coronalabs.com/daily/guide/events/appNotification/index.html#android-icons

I fear you’re wrong Joshua

Look at my list of files and terminal output.

Thoughts?

I’m not wrong.

Google’s Android SDK build system renames your unversioned icon files to “-v4” files when bundling them into the APK.

Trust me on this.  I’m one of the Android developers here at Corona Labs.  :slight_smile:

You make a good point! - Any idea why this is still erroring with Error 256 then when I build using those files in the screenshots?

You’re missing an “Icon-hdpi.png” file, which is an app icon file, not a notification icon file.

If you include at least 1 icon file in your project directory, then you have to include the entire DPI set or else a build error will occur.  We made it this way on purpose to ensure that none of our default Corona DPI icons will appear in your app.