Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.content.ContextWrapper; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; public class Main { public static Bitmap loadImageFromStorage(Context context) { Bitmap bitmap = null; try { ContextWrapper cw = new ContextWrapper(context); File directory = cw.getDir("imageDir", Context.MODE_PRIVATE); File f = new File(directory, "gravatar.jpg"); bitmap = BitmapFactory.decodeStream(new FileInputStream(f)); } catch (FileNotFoundException e) { e.printStackTrace(); } return bitmap; } }