Java tutorial
//package com.java2s; import android.graphics.BitmapFactory; public class Main { public static BitmapFactory.Options getBitmapOption(int inSampleSize) { System.gc(); BitmapFactory.Options options = new BitmapFactory.Options(); options.inPurgeable = true; options.inSampleSize = inSampleSize; return options; } }