[HOLD for payment 2022-01-12] Android - Add a round profile image on push notifications
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Log in with account A on Android
- Log in with account B on web
- Send some message from account B to account A
- Check the push notifications
Expected Result:
Profile picture in push notification should be a circle
Actual Result:
Profile picture in push notifications are squared
Workaround:
None needed.
Platform:
Where is this issue occurring?
- Android
Version Number: 1.1.10-0 Reproducible in staging?: Yes Reproducible in production?: Yes
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @Santhosh-Sellavel Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1635275538130700
Triggered auto assignment to @kevinksullivan (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@isagoico just to be sure before I export this, would you mind adding a screenshot of the iOS notification for comparison?
Sure! here's a pic. No profile images are displayed on iOS, only the app icon.

@kevinksullivan Huh... This is 4 days overdue. Who can take care of this?
@kevinksullivan Still overdue 6 days?! Let's take care of this!
@kevinksullivan 10 days overdue. Is anyone even seeing these? Hello?
Ok, so are we just rounding the image on android, or changing the image? I'm not sure I follow what is being proposed here.
@Santhosh-Sellavel just checking in here.
@kevinksullivan
Sorry couldn't get to this sooner!
I've attached screenshot from both platforms below, actually iOS doesn't have profile picture itself.
After seeing profile picture every where inside circle cropped and to sharp square cropped profile looks inconsistent to me.
iOS

Android

Share your thoughts, I'll look out for the possiblities in iOS to add a picture other than App Icon. I'm little unsure!
Thanks for breaking that down @Santhosh-Sellavel . I agree we can go ahead and fix this on android for consistency.
https://www.upwork.com/jobs/~01bdeacae514a5e9eb
Triggered auto assignment to @parasharrajat (Exported)
Triggered auto assignment to @marcaaron (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Here is my proposal to solve this issue.
In the android folder, you have a CustomNotificationProvider.java file. In which a bitmap is being fetched in order to be displayed as an icon. A solution would be clipping the bitmap against a circular clipping path to get a circular image. That is how I would solve it.
Android is not one of my strong points so I will delegate the decision to @marcaaron .
:ribbon: :eyes: :ribbon:
Ah hmm, and I might know less than you @parasharrajat 😂
@Julesssss 🥺 ?
I see the file mentioned was added here -> https://github.com/Expensify/App/pull/4270/files
And where the bitmap is created:
https://github.com/Expensify/App/blob/d175673f141c5dcbd3ed50813d7b113fca53b4dc/android/app/src/main/java/com/expensify/chat/CustomNotificationProvider.java#L210-L211
But don't know much about if we can clip that.. seem like we should be able to.
I see the file mentioned was added here -> https://github.com/Expensify/App/pull/4270/files
And where the bitmap is created:
https://github.com/Expensify/App/blob/d175673f141c5dcbd3ed50813d7b113fca53b4dc/android/app/src/main/java/com/expensify/chat/CustomNotificationProvider.java#L210-L211
But don't know much about if we can clip that.. seem like we should be able to.
We should be able to do something like mentioned in this issue.
https://stackoverflow.com/questions/11932805/how-to-crop-circular-area-from-bitmap-in-android
Ok seems reasonable to me @rafaysaleem89. Just going to wait for a confirmation from @Julesssss to see if he agrees!