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 createNoMedia() {
        //Create .nomedia in audio folder
        File dir = new File(Environment.getExternalStorageDirectory() + "/FranqInterface/audio");
        File nomediaFile = new File(dir, ".nomedia");
        try {
            nomediaFile.createNewFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}