Java tutorial
//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(); } } }