Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.os.Environment;

import java.io.File;

import java.io.IOException;

public class Main {
    public static void createCSV() {
        File folder = new File(Environment.getExternalStorageDirectory() + "/adspammer");
        if (!folder.exists())
            folder.mkdir();

        String filename = folder.toString() + "/" + "log.csv";

        File csvFile = new File(filename);
        if (!csvFile.exists())
            try {
                csvFile.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }

    }
}