Android SDCard Check getAlbumStorageDirectory(String albumName)

Here you can find the source of getAlbumStorageDirectory(String albumName)

Description

get Album Storage Directory

Declaration

public static File getAlbumStorageDirectory(String albumName) 

Method Source Code

//package com.java2s;

import android.os.Environment;
import android.util.Log;
import java.io.File;

public class Main {
    public static File getAlbumStorageDirectory(String albumName) {
        // Get the directory for the user's public pictures directory.
        File file = new File(
                Environment/*  w  w  w.  jav a  2s.c  o  m*/
                        .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),
                albumName);
        if (!file.mkdirs()) {
            Log.e("", "Directory not created");
        }
        return file;
    }
}

Related

  1. hasExternalStorage()
  2. isExtStorageReadable()
  3. isExtStorageWritable()
  4. isExternalStorageWritable()
  5. isExternalStoragePresent()
  6. getExtStoragePubDir(String dirName, String dirType)
  7. getAvailableStorageSize(File dir)
  8. getDatafilesStorageDirectory(Context context)