Android Question Loading pictures like Instagram

mrjaw

Active Member
Licensed User
Longtime User
Hi!
I am developing an app to show pictures like instagram or 9GAG. My problem is the time it takes to download an image.
I am looking for any advice or benchmarkinh how can I do this like 9GAG or another picture app.

I was trying to download 20 images but it is so slow if you internet is solow so how can I do this downlaod one by or bunch. I need any advice or method to do it.

Sorry for my bad english!
 

KMatle

Expert
Licensed User
Longtime User
Where are these images from? Your own on your own server (from a db)?

If yes:

- Reduce the size to f.e. 800x600 and 90% JPEG quality (so every image has about 30-50KB each). Or even less like 480x320.
- Store it as a Base64 string
- when retrieving you can create an array of 10 images or so and download it to your app (50KB * 10 = 500KB plus overhead) or load them in the background.
 
Upvote 0

mrjaw

Active Member
Licensed User
Longtime User
Sorry for delay.
The images are in my DB , stored like binary files. While you want to convert into Base64?
Maybe load the images on background
You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list.
Make sure to also remove old images to avoid consuming too much memory.
 
Upvote 0

mrjaw

Active Member
Licensed User
Longtime User
You need to download a few images each time and prepare the next images that will be displayed when the user scrolls the list.
Make sure to also remove old images to avoid consuming too much memory.


I did this but it was so slow, I downloaded 10 images at moment but it was sol slow
 
Upvote 0
Top