Java tutorial
//package com.java2s; import java.io.File; import java.io.IOException; import android.os.Environment; public class Main { public static File createImageFile() throws IOException { // Create an image file name File storageDir = Environment.getExternalStorageDirectory(); File image = File.createTempFile("temp", /* prefix */ ".jpg", /* suffix */ storageDir /* directory */ ); return image; } }