i am using this code
public void onClick(DialogInterface dialog, int which) {
File dir = new File (Environment.getExternalStorageDirectory() + "/MyApp/MyFolder");
if (dir.isDirectory())
{
File file = new File(card.imagePath);
file.delete();
}
But it is not deleting file from the card. Any ideas why?