Android File Name Create createImageName()

Here you can find the source of createImageName()

Description

create Image Name

Declaration

@SuppressLint("SimpleDateFormat")
    public static String createImageName() 

Method Source Code

//package com.java2s;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.annotation.SuppressLint;

public class Main {
    @SuppressLint("SimpleDateFormat")
    public static String createImageName() {
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyyMMdd_HHmmss");
        return "IMG"
                + dateFormat.format(new Date(System.currentTimeMillis()))
                + ".jpg";
    }//from  w  ww. j  ava2 s  .  com
}

Related

  1. makeFileName(String prefix, String filename)
  2. getLocalDateTimeForFileName(Date date)
  3. getJpegFileName(long fileNumber)
  4. getMetadataFileName(long fileNumber)
  5. getYuvFileName(long fileNumber)