Use application icon in push notification messages
Checklist
- [x] I have used the search function to see if someone else has already submitted the same bug report.*
- [x] I will describe the problem with as much detail as possible.*
App
K-9 Mail
App version
8.2
Where did you get the app from?
F-Droid
Android version
12
Description
The current icon displayed on the status bar when K9 is checking for emails on the background is a bell, as shown in the figures below:
It's a rather generic icon, more suited to an alarm app than an email client.
Using K9's own icon would make it clear what is actually running:
I think that makes sense, using some variant of the app icon. We'll have to use an icon that works with the specs required for notification icons. When someone works on this please let us know what size and specs you need and we'll create one or point it out. I believe there are some more specific requirements to make it align and fit in well.
There will likely be some refactoring necessary so that each app can use its own icon. This is a good starting point: https://github.com/thunderbird/thunderbird-android/blob/f258538ba0fb4a4c34ad35bdd5d95abf60472c97/legacy/common/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt#L38
For reference here is what it looks zoomed out on my device:
Please use a similar mechanism as the AppNameProvider and BrandNameProvider to allow different icons per app.
I would like to work on this. The icon needed for this should be a 24x24 dp Vector Drawable. Android will automatically scale it to fit the screen, ensuring that it adapts to different screen densities. It should be pure White with a transparent background.
Hey, apologies but we promised this one to @sttapollo already in chat. Would you mind taking one of the other issues?
Hi @kewisch this is what I noticed so far, please lmk if I am off here
- In K-9 Mail, iconPushNotification (from K9CoreResourceProvider) is used for the foreground push service.
- In Thunderbird, I see iconCheckingMail (from NotificationResourceProvider) used in SyncNotificationController when background sync runs. This seems like the equivalent of K-9’s iconPushNotification.
Would like to confirm:
- Is iconCheckingMail the intended equivalent push/sync icon in Thunderbird?
- If so, would it make sense to unify this across both apps via something like a NotificationIconProvider interface? (Sticking to the mechanism wmontwe mentioned above)
- Do we want to update the icon in Thunderbird too? (Before I proceed to ask for assets)
Also, please assign this ticket to me 😅
Apologies for the delay. @wmontwe do you have more info here on the technical bits re iconCheckingMail/iconPushNotification ? I kind of would have expected that the same icon is used on both apps.
Either way, I think we should use the respective app icon in both apps, and using a NotificationIconProvider makes sense for that. Thanks for looking into this!
@kewisch We need to make a decision on whether to use a generic icon or the monochrome app icon. If we choose to use the app icon, it should be provided with a similar mechanism as the AppNameProvider. Alternatively, using the simplest approach would be to retrieve the icon from Material Icons.
I don't have a preference between monochrome and generic icon, I think this is something @SttApollo could ask the design folks. Using a Material icon I think was what we're trying to avoid in the first place, aiming for the app icon instead. Or am I misunderstanding?
@SttApollo do you have everything you need to reach out to design?
yes @kewisch - I'll reach out to them shortly!
Hello @SttApollo We should be using the app icon in the top left corner on any notification card show in the notifications area or lock screen. Do you need the K-9 logo or TB logo formatted? Or can you pull from what we're using in the app currently?
Hi @laurelterlesky — for the Android notifications (lock screen, status bar, and left side of the notification card), it looks like we need a monochrome white logo with a transparent background in the form of a 24x24dp vector drawable.
I manually updated the black version of the logo to white to test the logic I’ve implemented, and it seems to be working as expected. Would you be able to provide a proper version of the icon? Once that’s in place, I can finalize the logic and move forward with the PR.
@laurelterlesky What do you think of my comments above?
Sure. Will see if we have one of file, otherwise we'll build one.
@laurelterlesky any luck?
Hello! Sorry for the delay. Attached is a 24px svg and a drawable vector export. Let me know if this works. It should scale appropriately, but let me know if you need a smaller version.