App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2022-01-12] Android - Add a round profile image on push notifications

Open isagoico opened this issue 5 years ago • 36 comments

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:

  1. Log in with account A on Android
  2. Log in with account B on web
  3. Send some message from account B to account A
  4. 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 image

Expensify/Expensify Issue URL:

Issue reported by: @Santhosh-Sellavel Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1635275538130700

View all open jobs on GitHub

isagoico avatar Oct 29 '21 23:10 isagoico

Triggered auto assignment to @kevinksullivan (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Oct 29 '21 23:10 MelvinBot

@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Nov 02 '21 19:11 MelvinBot

@isagoico just to be sure before I export this, would you mind adding a screenshot of the iOS notification for comparison?

kevinksullivan avatar Nov 03 '21 23:11 kevinksullivan

Sure! here's a pic. No profile images are displayed on iOS, only the app icon.

isagoico avatar Nov 04 '21 00:11 isagoico

@kevinksullivan Huh... This is 4 days overdue. Who can take care of this?

MelvinBot avatar Nov 09 '21 19:11 MelvinBot

@kevinksullivan Still overdue 6 days?! Let's take care of this!

MelvinBot avatar Nov 11 '21 19:11 MelvinBot

@kevinksullivan 10 days overdue. Is anyone even seeing these? Hello?

MelvinBot avatar Nov 15 '21 19:11 MelvinBot

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.

kevinksullivan avatar Nov 16 '21 00:11 kevinksullivan

@Santhosh-Sellavel just checking in here.

kevinksullivan avatar Nov 24 '21 22:11 kevinksullivan

@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

25112021044100.png

Android

Screenshot_20211125-044256_One UI Home.jpg

Santhosh-Sellavel avatar Nov 24 '21 23:11 Santhosh-Sellavel

Share your thoughts, I'll look out for the possiblities in iOS to add a picture other than App Icon. I'm little unsure!

Santhosh-Sellavel avatar Nov 24 '21 23:11 Santhosh-Sellavel

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

kevinksullivan avatar Dec 08 '21 19:12 kevinksullivan

Triggered auto assignment to @parasharrajat (Exported)

MelvinBot avatar Dec 08 '21 19:12 MelvinBot

Triggered auto assignment to @marcaaron (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Dec 08 '21 19:12 MelvinBot

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.

rafaysaleem89 avatar Dec 09 '21 15:12 rafaysaleem89

Android is not one of my strong points so I will delegate the decision to @marcaaron .

:ribbon: :eyes: :ribbon:

parasharrajat avatar Dec 09 '21 16:12 parasharrajat

Ah hmm, and I might know less than you @parasharrajat 😂

@Julesssss 🥺 ?

marcaaron avatar Dec 09 '21 16:12 marcaaron

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.

marcaaron avatar Dec 09 '21 16:12 marcaaron

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

rafaysaleem89 avatar Dec 09 '21 17:12 rafaysaleem89

Ok seems reasonable to me @rafaysaleem89. Just going to wait for a confirmation from @Julesssss to see if he agrees!

marcaaron avatar Dec 09 '21 17:12 marcaaron