title: java.lang.NoSuchMethodError: android.app.DownloadManager$Request.setNotificationVisibility
body: <p>Trying to use <a href="http://developer.android.com/reference/android/app/DownloadManager.html" rel="nofollow">DownloadManager</a> like so</p>
  
  <pre><code>DownloadManager.Request request = new DownloadManager.Request(uri)
              .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_MOBILE)
              .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI)
              .setAllowedOverRoaming(true)
              .setDestinationInExternalFilesDir(this, null,String.valueOf(mPathAndFolder))
              .setVisibleInDownloadsUi(false)
              .setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN);
  
  
  long downloadID = downloadManager.enqueue(request);
  </code></pre>
  
  <p>Added the following permission in Android Manifest</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/&gt;
  </code></pre>
  
  <p>Getting the following error at runtime</p>
  
  <blockquote>
    <p>java.lang.NoSuchMethodError:
    android.app.DownloadManager$Request.setNotificationVisibility</p>
  </blockquote>
  
  <p>Why this error? How to make DownloadManager work?</p>