Closed Nico3652 closed 1 year ago
Hi @Nico3652,
Usually, you access a needed rendition in this way:
result?.data?.images.fixedWidth.gifUrl
Here you can read more about the renditions.
In Android SDK we also have a convenience function to take a needed rendition:
result?.data?.imageWithRenditionType(RenditionType.fixedWidth).gifUrl
We use it internally, but it's exposed to the public too.
Hi @ALexanderLonsky
Thanks a lot for answer this is what I was looking for !
I've created a Flutter app so my widgets are rendered on the flutter side. So I have to retrieve the media url in order to display it inside my
Image.network()
widget. The problem is not on the Flutter side.This use case is in a messaging part in my app : -> A user pick/tap a media in the android grid -> then I'm saving in database the media ID retrieved -> and then when the chat UI is loaded I'm getting the media url by ID to load the Gif in my image widget
Nothing special until now everything is ok, but from this next method the
result.data
is not returning the right url I needHere is the same method in
Swift
on the iOS SDK :For the same GIF : (Do right click + open new tab on the link)
On the iOS side, the url retrieved is : https://media0.giphy.com/media/iIk7rXWg3dL894tIg9/200w.gif?cid=69172d4b342ce44e7214c335b72edc565f933fc066d6cf54&rid=200w.gif&ct=ts (the media itself)
Whereas on Android side :
https://giphy.com/stickers/laugh-hehe-gebyk-iIk7rXWg3dL894tIg9 (the website + media)
I tried all these but the result is the same or null/empty
I searched for doc and inside classes like
Media()
class but no details found for nowIs there a way to retrieve from the data the same url that provide iOS SDK ?
Thanks for any help on this!