Android create temporary file in sd card

private File getTemporaryFile(Context context){
  //it will return /sdcard/yourImage.tmp
  final File path = new File( Environment.getExternalStorageDirectory(), context.getPackageName() );
  if(!path.exists()){
    path.mkdir();
  }
  return new File(path, "yourImage.tmp");
}

Comments

Popular posts from this blog

Input filter (space not allowed) for EditText

Android Versions details

English - Formal and Informal words