Java tutorial
//package com.java2s; import android.net.Uri; import android.os.Environment; import java.io.File; public class Main { public static Uri getOutputUri() { File dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); if (dir.exists() == false) { dir.mkdirs(); } File file = new File(dir, "photo.png"); return Uri.fromFile(file); } }