Example usage for android.os Environment DIRECTORY_ALARMS

List of usage examples for android.os Environment DIRECTORY_ALARMS

Introduction

In this page you can find the example usage for android.os Environment DIRECTORY_ALARMS.

Prototype

String DIRECTORY_ALARMS

To view the source code for android.os Environment DIRECTORY_ALARMS.

Click Source Link

Document

Standard directory in which to place any audio files that should be in the list of alarms that the user can select (not as regular music).

Usage

From source file:com.example.android.scopeddirectoryaccess.ScopedDirectoryAccessFragment.java

private String getDirectoryName(String name) {
    switch (name) {
    case "ALARMS":
        return Environment.DIRECTORY_ALARMS;
    case "DCIM":
        return Environment.DIRECTORY_DCIM;
    case "DOCUMENTS":
        return Environment.DIRECTORY_DOCUMENTS;
    case "DOWNLOADS":
        return Environment.DIRECTORY_DOWNLOADS;
    case "MOVIES":
        return Environment.DIRECTORY_MOVIES;
    case "MUSIC":
        return Environment.DIRECTORY_MUSIC;
    case "NOTIFICATIONS":
        return Environment.DIRECTORY_NOTIFICATIONS;
    case "PICTURES":
        return Environment.DIRECTORY_PICTURES;
    case "PODCASTS":
        return Environment.DIRECTORY_PODCASTS;
    case "RINGTONES":
        return Environment.DIRECTORY_RINGTONES;
    default:/*ww w .  j  a  va2  s .  c om*/
        throw new IllegalArgumentException("Invalid directory representation: " + name);
    }
}