Use this to get the directory:
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
And don’t forget to set this permission in your manifest.xml
:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
More Related Contents:
- How to save the button that has been added dynamically in Android?
- Android apps on ios
- “Conversion to Dalvik format failed with error 1” on external JAR
- Share SQLite database between 2 android apps?
- startForeground fail after upgrade to Android 8.1
- Disable scrolling in webview?
- Android: customize application’s menu (e.g background color)
- Unicode characters not displayed in TextView.setText
- Gson NoClassDefFoundError after ADT and SDK Tools update to v17
- Passing string array between android activities
- how to detect orientation of android device?
- Volley JsonObjectRequest Post parameters no longer work
- How to securely store access token and secret in Android?
- error “activity class does not exist” when launching android app with adb shell am start
- Passing JSONObject into another activity
- How to change the Font Size in a whole Application programmatically, Android?
- Text with gradient in Android
- Adt doesn’t create default hello world but command line does
- ActionBarSherlock stacked action bar styling issue
- Android Studio Emulator: VK_VERSION_1_1 check failed
- Android how to save a bitmap – buggy code
- Difference between make and build in Android Studio
- Can someone explain descendantFocusability = afterDescendants?
- Android resource IDs suddenly not final, switch()’es broken
- How to get real screen height and width?
- Android SDK installation issue – Peer not authenticated
- Grid Layout support in android API 10
- Digital Assets Link link to my website
- Move an Image in circular path in android
- android.content.res.Resurces$NotFoundException : String resource ID #0x0 [duplicate]