create Movie File Path - Android java.io

Android examples for java.io:File Directory

Description

create Movie File Path

Demo Code


import java.io.File;

import android.os.Environment;
import android.text.format.DateFormat;

public class Main {
  public static final String DATE_FORMAT = "yyyy-MM-dd_kk.mm.ss";
  public static final String DIR_SAVE_PICS = Environment
      .getExternalStorageDirectory().toString() + "/CTW";

  public static String createMovieFilePath() {
    String filename = DateFormat
        .format(DATE_FORMAT, System.currentTimeMillis()).toString();
    return DIR_SAVE_PICS + File.separator + filename + ".mp4";
  }/*from   www .j  a  va2 s. c om*/
}

Related Tutorials