How create extension delete storage

public void deleteExternalStoragePublicPicture() {

File path = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES);
File file = new File(path, “DemoPicture.jpg”);
file.delete();
}