Android how to delete a file

File file = new File(myFilePath);
boolean deleted = file.delete();
Log.v("log_tag","deleted: " + deleted);

You must pass the complete path to file that you want to delete in myFilePath
Example: /data/data/com.as400samplecode/myDirectory/20111113_153214_abc.png