Java tutorial
//package com.java2s; //License from project: Creative Commons License import java.io.File; import java.io.IOException; import android.content.Context; public class Main { private static final String NOMEDIA_FILE = "/.nomedia"; public static void createNomedia(Context context) { try { File file = new File(context.getExternalFilesDir(null).getAbsolutePath() + NOMEDIA_FILE); //file.mkdirs(); ??? if (!file.exists()) { file.createNewFile(); } } catch (IOException e) { e.printStackTrace(); } } }