Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import android.os.Environment; public class Main { public static String getPhotoFileName() { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()); Date date = new Date(); return Environment.getExternalStorageDirectory().getPath() + "/DCIM/100ANDRO/Todo_" + dateFormat.format(date) + ".jpg"; } }