Android Context Get getTempFile(Context context)

Here you can find the source of getTempFile(Context context)

Description

get Temp File

Declaration

public static File getTempFile(Context context) 

Method Source Code

//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");
    }
}

Related

  1. getStringResourceByName(String aString, Context context)
  2. getSystemDiskCacheDir(Context context)
  3. getTCBoldFont(Context context)
  4. getTCFont(Context context)
  5. getTCItalicFont(Context context)
  6. getTimestamp(Context context)
  7. getTypeface(Context context, String name)
  8. getUserAgentString(Context context)
  9. getVersion(Context context)