File file = new File(selectedFilePath);
boolean deleted = file.delete();
where selectedFilePath is the path of the file you want to delete – for example:
/sdcard/YourCustomDirectory/ExampleFile.mp3
More Related Contents:
- How to use the new SD card access API presented for Android 5.0 (Lollipop)?
- How can I get the external SD card path for Android 4.0+?
- Android get free size of internal/external memory
- Android 6.0 Marshmallow. Cannot write to SD Card
- Solution to INSTALL_FAILED_INSUFFICIENT_STORAGE error on Android [closed]
- error opening trace file: No such file or directory (2)
- Android: How to open a specific folder via Intent and show its content in a file browser?
- Reading an image file into bitmap from sdcard, why am I getting a NullPointerException?
- reading a specific file from sdcard in android
- How do I transfer an image from its URL to the SD card?
- How to tell if the sdcard is mounted in Android?
- Android Open External Storage directory(sdcard) for storing file
- Simple mediaplayer play mp3 from file path?
- Displaying images from a specific folder on the SDCard using a gridview
- Android SAF (Storage Access FrameWork): Get particular file Uri from TreeUri
- Android SD Card Write Permission using SAF (Storage Access Framework)
- Copying raw file into SDCard?
- Stop saving photos using Android native camera
- Writing Text File to SD Card fails
- SDCard content exist but cant see them
- Getting all the total and available space on Android
- Android: Display Image from SD CARD
- Android – Save images in an specific folder
- Check if the SDCard is present, boolean is always true
- is there a maximum size to android internal storage allocated for an app?
- Android: FileObserver monitors only top directory
- How to make a file hidden in android sd card?
- image attachment to a mail.. how in android?
- How do I adb pull ALL files of a folder present in SD Card
- How to get the internal and external sdcard path in android