title: Android can't open file
body: <p>I'm trying to download an apk file from server via DownloadManager:</p>
  
  <pre><code>dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
          DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
          request.setMimeType("application/vnd.android.package-archive");
          request.allowScanningByMediaScanner();
          enqueue = dm.enqueue(request);
  </code></pre>
  
  <p>When the apk is downloaded and I press it I'm getting "can't open file message",<br/>
  But if I download that apk via Browser <strong>instead of DownloadManger</strong>:</p>
  
  <pre><code>Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
  startActivity(browserIntent);
  </code></pre>
  
  <p><strong>The apk works fine.</strong><br/>
  The device is open for "Unknown sources" and it's version is 4.1.2</p>
  
  <p>What am I doing wrong?</p>