Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.File;

import android.os.Environment;

public class Main {
    /**
     * Clears any leftover photos in our temporary folder.
     */
    public static void clearPhotos() {
        File tempDir = Environment.getExternalStorageDirectory();
        tempDir = new File(tempDir.getAbsolutePath() + "/bv-temp/");
        if (tempDir.listFiles() != null) {
            for (File photo : tempDir.listFiles()) {
                photo.delete();
            }
        }
    }
}