Android: ¿Cómo eliminar archivos del almacenamiento externo?
Implemento una aplicación que genera y crea archivos en almacenamiento externo. ¿Pueden ustedes ayudarme, cómo podemos eliminar eso?
Gracias chandra
Edit-1: Agregué el siguiente código y sigo teniendo el mismo problema. Por favor, eche un vistazo a mi código a continuación.
String fullPath = "/mnt/sdcard/";
System.out.println(fullPath);
try{
File file = new File(fullPath, "audio.mp3");
if(file.exists()){
boolean result = file.delete();
System.out.println("Application able to delete the file and result is: " + result);
// file.delete();
}else{
System.out.println("Application doesn't able to delete the file");
}
}catch (Exception e){
Log.e("App", "Exception while deleting file " + e.getMessage());
}
En el LogCat estoy consiguiendoAplicación capaz de eliminar el archivo y el resultado es: falso. Adjunté mi captura de pantalla después de ejecutar esto. Por favor, eche un vistazo a eso. Y sugiéreme.