notifo-io / sdk-xamarin

6 stars 1 forks source link

Automatic resize #1

Closed SebastianStehle closed 2 years ago

SebastianStehle commented 3 years ago

https://github.com/notifo-io/sdk-xamarin/blob/f5356a83edde7b164151a69aa6db4983c707cd22/sdk/Notifo.SDK.FirebasePlugin/NotifoPushNotificationHandler.android.cs#L102

When the notification comes from Notifo itself, the server can do the resize. We should check that.

https://app.notifo.io/api/docs/index.html?url=/api/openapi.json#operation/Media_Download

sanyandreichuk commented 3 years ago

I'm not sure about this idea, as we send push notifications to different devices with different screen sizes and I assume these width/height values can differ between devices, so we can't resize it on the Notifo backend because we don't know what device will receive the notification.

SebastianStehle commented 3 years ago

The backend will do it on the fly and then cache it.

sanyandreichuk commented 3 years ago

Should be resolved in this commit

SebastianStehle commented 3 years ago

2 Things:

  1. We can only use the automated resize as of now if the image url has the same host name as the api url.
  2. There is a spelling error GetDimention instead of GetDimension
sanyandreichuk commented 2 years ago

Implemented