Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.os.Environment; import java.io.FileOutputStream; import java.io.OutputStream; public class Main { public static void saveBitmap(Bitmap bitmap, String fileName) { String filePath = Environment.getExternalStorageDirectory() + "/" + fileName; try { OutputStream stream = new FileOutputStream(filePath); bitmap.compress(Bitmap.CompressFormat.PNG, 80, stream); stream.close(); } catch (Exception e) { throw new RuntimeException(e); } } }