1

The app is getting crashed because of out of memory exception while loading images from internal storage for that am using below code

ImageHandler.getSharedInstance(context).load(imgFile)
            .skipMemoryCache().memoryPolicy(MemoryPolicy.NO_STORE,MemoryPolicy.NO_CACHE)
            .fit().into(imageView);

public class ImageHandler {

private static Picasso instance;

public static Picasso getSharedInstance(Context context)
{
    if(instance == null)
    {
        instance = new Picasso.Builder(context).executor(Executors.newSingleThreadExecutor()).memoryCache(Cache.NONE).indicatorsEnabled(false).build();
    }
    return instance;
}

}

but now app is not crashing but it is unable to load the image (Showing empty blank screen)

Vinoth Vino
  • 9,166
  • 3
  • 66
  • 70
venkatesh gowda
  • 841
  • 2
  • 12
  • 26

0 Answers0