Java Code Examples for android.os.Environment.DIRECTORY_DOCUMENTS

The following are Jave code examples for showing how to use DIRECTORY_DOCUMENTS of the android.os.Environment class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: FicsaveMiddleware   File: SettingsFragment.java   View Source Code Vote up 5 votes
private void updatePreferenceView() {

        String emailAddress = prefs.getString(EMAIL_ADDRESS_TO_SEND_TO, "");
        CharSequence tempSummary;
        if (emailAddress.isEmpty()) {
            tempSummary = emailAddressPref.getSummary();
        } else {
            tempSummary = emailAddress;
        }

        getPreferenceScreen().removeAll();
        addPreferencesFromResource(R.xml.preferences);

        versionPref = findPreference(PREF_VERSION);
        versionPref.setSummary(versionSummary);

        Preference downloadFolderPref = findPreference(DOWNLOAD_FILE_PREFERENCE);
        String defaultDownloadFolder = Environment.getExternalStorageDirectory()
                + "/" + Environment.DIRECTORY_DOCUMENTS;
        downloadFolderPref.setSummary(defaultDownloadFolder);
        emailAddressPref = findPreference(EMAIL_ADDRESS_TO_SEND_TO);
        emailAddressPref.setSummary(tempSummary);
        developerPref = findPreference(PREF_DEVELOPER);
        privacyPolicyPref = findPreference(PREF_PRIVACY_POLICY);

        initializePreferenceListener();
    }