Android Open Source - AudioRecorderAndroid Recorder File Name Helper






From Project

Back to project page AudioRecorderAndroid.

License

The source code is released under:

MIT License

If you think the Android project AudioRecorderAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.aemreunal.audiorecorder.model;
//from   w w  w. j  a v  a 2s .c  o  m
/*
 * This code belongs to:
 * Ahmet Emre Unal
 * S001974
 * emre.unal@ozu.edu.tr
 */

import android.os.Environment;

import java.util.Calendar;

public class RecorderFileNameHelper {

    public static String getOutputFilePath(String jobName) {
        Calendar calendar = Calendar.getInstance();
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder.append(Environment.getExternalStorageDirectory().getAbsolutePath());
        stringBuilder.append("/");

        stringBuilder.append(jobName);

        stringBuilder.append("-android-");

        stringBuilder.append(calendar.get(Calendar.YEAR));
        stringBuilder.append("-");
        stringBuilder.append(calendar.get(Calendar.MONTH));
        stringBuilder.append("-");
        stringBuilder.append(calendar.get(Calendar.DAY_OF_MONTH));
        stringBuilder.append("-");
        stringBuilder.append(calendar.get(Calendar.HOUR));
        stringBuilder.append("-");
        stringBuilder.append(calendar.get(Calendar.MINUTE));
        stringBuilder.append("-");
        stringBuilder.append(calendar.get(Calendar.SECOND));

        stringBuilder.append(".mp4");

        return stringBuilder.toString();
    }
}




Java Source Code List

com.aemreunal.audiorecorder.ApplicationTest.java
com.aemreunal.audiorecorder.RootActivity.java
com.aemreunal.audiorecorder.model.RecorderActivityController.java
com.aemreunal.audiorecorder.model.RecorderController.java
com.aemreunal.audiorecorder.model.RecorderFileNameHelper.java
com.aemreunal.audiorecorder.model.Recorder.java
com.aemreunal.audiorecorder.view.ProgressWheel.java
com.aemreunal.audiorecorder.view.RecorderActivity.java