I am getting my GIF image as a byte array from the server. Now since android cannot display animated GIFs in the ImageView, I have to decode it and show it as a movie.
The problem that I am facing here is that the GIF that I am getting from the server has its dimensions set for an iPhone. So the GIF comes out really small on Android devices with larger screen/resolution.
To fix this I have two alternatives:
1) I could either extract each Bitmap from the GIF and scale them according to my screen size. But for that I will have to mess up the aspect ratio and the image will come out stretched.
2) Or I could ask the server guys to add support for Android devices, so that they could send me the GIF according to my screen size.
Please recommend as to what the best solution would be. Do tell if you have any suggestions of your own.
I would recommend you to go with the second option, one thing that you have to always consider in developing mobile application is Battery Usage, processing image in android rather than having it ready to use from the server, will suffer the device battery and the user absolutely wouldn’t be happy with it.