[GH-ISSUE #120] App icon does not show up on Android 7 #98

Closed
opened 2026-05-07 00:19:58 +02:00 by BreizhHardware · 6 comments

Originally created by @shadow00 on GitHub (Jan 28, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/120

Just installed ntfy (v1.7.2, from F-Droid) on an Android 7.0 device, and the app icon does not show up. Looks like it's using the stock Android template icon.

ntfy-icon-broken

On my Android 8.1 phone it shows up fine.

Originally created by @shadow00 on GitHub (Jan 28, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/120 Just installed ntfy (v1.7.2, from F-Droid) on an Android 7.0 device, and the app icon does not show up. Looks like it's using the stock Android template icon. ![ntfy-icon-broken](https://user-images.githubusercontent.com/4933508/151471225-afcbb42b-4c03-4d4d-ad79-a900252b4e44.png) On my Android 8.1 phone it shows up fine.
BreizhHardware 2026-05-07 00:19:58 +02:00
Author
Owner

@binwiederhier commented on GitHub (Jan 28, 2022):

I have seen this in the emulator but haven't had the time to find out why. Thanks for reporting.

<!-- gh-comment-id:1023809926 --> @binwiederhier commented on GitHub (Jan 28, 2022): I have seen this in the emulator but haven't had the time to find out why. Thanks for reporting.
Author
Owner

@binwiederhier commented on GitHub (Mar 13, 2022):

I spent 30min on this, and even with extensive googling, I couldn't figure out what is wrong. Stack overflow points to roundIcon as the culprit, but I have that set properly:

    <application
            android:name=".app.Application"
            android:icon="@mipmap/ic_launcher"
            android:roundIcon="@mipmap/ic_launcher_round"

Given that only 15 devices out of the almost 600 are using Android 7 or older I am going to close this for now. If this really bothers you, I can give it another shot.

@shadow00 You could find an open source app that has the icon set correctly and link that here. That may help.

For now, I'll close the ticket, but I'm more than happy to re-open in case there are new developments.

<!-- gh-comment-id:1066207942 --> @binwiederhier commented on GitHub (Mar 13, 2022): I spent 30min on this, and even with extensive googling, I couldn't figure out what is wrong. Stack overflow points to `roundIcon` as the culprit, but I have that set properly: ``` <application android:name=".app.Application" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" ``` Given that only 15 devices out of the almost 600 are using Android 7 or older I am going to close this for now. If this really bothers you, I can give it another shot. @shadow00 You could find an open source app that has the icon set correctly and link that here. That may help. For now, I'll close the ticket, but I'm more than happy to re-open in case there are new developments.
Author
Owner

@shadow00 commented on GitHub (Apr 26, 2022):

Sorry for the late reply, I got distracted by other stuff and forgot to reply. Here are a few f-droid apps with working icons:

I assume you've already seen this, but just in case: some of the replies suggest deleting the android:roundIcon="@mipmap/ic_launcher_round" line entirely and using only android:icon when targeting a lower API version; one of the comments mentions a bug in Android Studio that adds it back by mistake even when you remove it.

It's not a critical bug though, so if you want to prioritize other issues that's fine :)

<!-- gh-comment-id:1109836370 --> @shadow00 commented on GitHub (Apr 26, 2022): Sorry for the late reply, I got distracted by other stuff and forgot to reply. Here are a few f-droid apps with working icons: - [Plees-Tracker](https://f-droid.org/en/packages/hu.vmiklos.plees_tracker/) - [Tasks.org](https://f-droid.org/en/packages/org.tasks/) - [KeepassDX](https://f-droid.org/en/packages/com.kunzisoft.keepass.libre/) - [Nextcloud](https://f-droid.org/en/packages/com.nextcloud.client/) I assume you've already seen [this](https://stackoverflow.com/questions/43049734/no-resource-identifier-found-for-attribute-roundicon-in-package-android), but just in case: some of the replies suggest deleting the `android:roundIcon="@mipmap/ic_launcher_round"` line entirely and using only `android:icon` when targeting a lower API version; one of the comments mentions a bug in Android Studio that adds it back by mistake even when you remove it. It's not a critical bug though, so if you want to prioritize other issues that's fine :)
Author
Owner

@binwiederhier commented on GitHub (May 1, 2022):

I looked at https://github.com/nextcloud/android/blob/master/app/src/main/AndroidManifest.xml and have a first success on SDK 24 (🥳)

image

<!-- gh-comment-id:1114322191 --> @binwiederhier commented on GitHub (May 1, 2022): I looked at https://github.com/nextcloud/android/blob/master/app/src/main/AndroidManifest.xml and have a first success on SDK 24 (:partying_face:) ![image](https://user-images.githubusercontent.com/664597/166162582-bc3ff101-9628-465b-864c-6c51e2d2d61d.png)
Author
Owner

@binwiederhier commented on GitHub (May 1, 2022):

Thanks for the example @shadow00; now it'll hopefully be easy.

<!-- gh-comment-id:1114322317 --> @binwiederhier commented on GitHub (May 1, 2022): Thanks for the example @shadow00; now it'll hopefully be easy.
Author
Owner

@binwiederhier commented on GitHub (May 2, 2022):

Fixed in github.com/binwiederhier/ntfy-android@a2551bc7f0, will be in next release.

Turns out I had to generate a Legacy icon (which I had done before ...) with the "Trim" option. No idea why, but apparently that generates the combined images, as opposed to foreground and background separately:

image

<!-- gh-comment-id:1114379522 --> @binwiederhier commented on GitHub (May 2, 2022): Fixed in https://github.com/binwiederhier/ntfy-android/commit/a2551bc7f0889ba0a094c24c3b1b8b7a406adc7b, will be in next release. Turns out I had to generate a Legacy icon (which I had done before ...) with the "Trim" option. No idea why, but apparently that generates the combined images, as opposed to foreground and background separately: ![image](https://user-images.githubusercontent.com/664597/166170925-184bd53b-49bc-4f4d-bf2b-9f3eea5b0d46.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#98
No description provided.