title: Android DownloadManager illegalstateexception unable to create directory
body: <p>I'm making android app which is using DownloadManager.
  I want to download file into folder which I made.
  But this sources don't operate.
  And happen IllegalstateException.
  What can I do??</p>
  
  <pre><code>urlToDownload = Uri.parse(URL);
  List&lt;String&gt; pathSegments = urlToDownload.getPathSegments();
  request = new DownloadManager.Request(urlToDownload);
  request.setTitle(Titlename);
  request.setDescription("MCPE STORE");
  request.setDestinationInExternalPublicDir(
                     Environment.getExternalStorageDirectory().getAbsolutePath() + 
                     "/MCPE STORE", pathSegments.get(pathSegments.size()-1));
  
  Environment.getExternalStoragePublicDirectory(
                     Environment.getExternalStorageDirectory().getAbsolutePath() + 
                     "/MCPE STORE").mkdir();
  latestId = downloadManager.enqueue(request);
  </code></pre>