

Intent in1 = new Intent(this, Activity2.class) Convert to byte arrayīyteArrayOutputStream stream = new ByteArrayOutputStream() īmp.compress(, 100, stream) In your newly created activity for example, the image will load instantly because it is loading from the cache - even if your image URL has expired since the download.Ĭonvert it to a Byte array before you add it to the intent, send it out, and decode. Now, just pass the image URL in your intent and use the UIL to load the image. defaultDisplayImageOptions(defaultOptions) ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())


You can configure it to then cache the image to disk: DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder() Instead of passing a bitmap around (which I presume you downloaded from the network, otherwise, you would already have a file reference to it), I recommend using an image loader such as Universal Image Loader to download an image into an ImageView. I would like to also post a best practices answer for those looking to do this (but may be asking the wrong question).
