Question

I'm making the mobile version of an online store and i have to make it available when offline.

The problem is with photos: the store might have a large number of products, thus photos.

What method of saving the images should i use considering that a phone has some hardware limitation?

What I want is

  1. As small as possible occupied memory with ok performance at reading it.

  2. Writing speed is also something to be considered since downloading so much data will take some time and the user might decide it's not worth the wait(this is a secondary problem though).

Was it helpful?

Solution

Consider using Universal Image Loader In my application i load more than 300 photos and i don't get outOfMemoryException error however the library needs to draw some cache. Here's the project on GitHub:

https://github.com/thest1/LazyList

OTHER TIPS

you can try aquery android library for lazy loading image and its also store images in cache memory so you not need to store it externally...below code may help you.....

AQuery aq = new AQuery(mContext);
aq.id(R.id.image1).image("http://data.whicdn.com/images/63995806/original.jpg");

You can download library from from this link

I recommend Google Volley for handling networking and image loading. It's a very powerful yet super simple interface for accomplishing all you network needs without worrying about implementation details.

You have 2 built in levels of caching out of the box, and you can always add your own.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top