Code example for File

Methods: createTempFile

0
            boolean highQuality, long maxFileSize) {
        stop(); 
 
        if (mSampleFile == null) {
            try { 
                mSampleFile = File.createTempFile(SAMPLE_PREFIX, extension, mSampleDir);
                renameSampleFile(name);
            } catch (IOException e) {
                setError(STORAGE_ACCESS_ERROR);
                return; 
            } 
        } 
 
        RecorderService.startRecording(mContext, outputfileformat, mSampleFile.getAbsolutePath(),
                highQuality, maxFileSize);
        mSampleStart = System.currentTimeMillis();
    } 
 
    public void stopRecording() { 
        if (RecorderService.isRecording()) { 
            RecorderService.stopRecording(mContext);