android - OutOfMemoryException issue using Picasso -


our application image resource heavy. don't have provision of sending images depending on device resolution server. images sent server of high resolution (around 900 x 900). have few queries : 1) image downloaded , stored in file disk cache of same size original size in server.

2) once image saved in file disk cache, how image processed bring in in-memory cache. bitmap image stored in in-memory cache transformed lower resolution depending on device resolution?

3) if target image height , width not known how can scale down bitmap image per device resolution? per our requirement, not possible give fixed width , height imageview. there resize(int, int) method problem is, can't change image height , width in cases. ideally, there should solution downscale image size % (lets 20%).

crash not occur depends of memory.

you can use android:largeheap="true" request larger heap size, not work on pre honeycomb devices. on pre 2.3 devices, can use vmruntime class, not work on gingerbread , above.

the way have large limit possible memory intensive tasks via ndk, ndk not impose memory limits sdk.

alternatively, load part of model in view, , load rest need it, while removing unused parts memory. however, may not possible, depending on app.

example: <application android:largeheap="true" ....</application> 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -