Delete folder from storage0 - android
<p>I cant delete the folder in storage. This is my code </p>

<pre><code>  File dir = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/sdcard/folder" );
                if (dir.isDirectory())
                {
                    String[] children = dir.list();
                    for (int i = 0; i &lt; children.length; i++)
                    {
                        new File(dir, children[i]).delete();
                    }
                }
</code></pre>