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 {
    private static String folderName = "myNotifications";

    /***
     * delete all logs
     */
    public static void deleteAllFiles() {
        File directory = new File(Environment.getExternalStorageDirectory() + File.separator + folderName);
        if (directory.exists()) {
            for (File file : directory.listFiles())
                file.delete();
        }
    }
}