Here you can find the source of getTempFile(Context context)
public static File getTempFile(Context context)
//package com.java2s; import java.io.File; import android.content.Context; import android.os.Environment; public class Main { public static File getTempFile(Context context) { // It will return /sdcard/image.tmp final File path = new File( Environment.getExternalStorageDirectory(), context.getPackageName()); if (!path.exists()) { path.mkdir();/*from w w w . j a v a 2s. c o m*/ } return new File(path, "image.tmp"); } }