Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.os.Environment;

public class Main {
    private static final String AUDIO_FILE_NAME = "audiorecordtest.wav";
    private static final String VIDEO_FILE_NAME = "videorecordtest.3gp";

    public static String getFileName(boolean isAudio) {
        String storageDir = Environment.getExternalStorageDirectory().getAbsolutePath();
        return String.format("%s/%s", storageDir, (isAudio) ? AUDIO_FILE_NAME : VIDEO_FILE_NAME);
    }
}