title: Download apk file from S3 using DownloadManager
body: <p>Is there a way to download a file from an S3 bucket using Android's DownloadManager?</p>
  
  <p>I can currently download an apk file from Dropbox doing this:</p>
  
  <pre><code>DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
  
  request.addRequestHeader("Content-Type", "application/vnd.android.package-archive");
  request.setMimeType("application/vnd.android.package-archive");
  
  final DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
  final long id = manager.enqueue(request);
  </code></pre>
  
  <p>Now what I want to do is replace "url" with my Amazon URL. When I do this, the download just stays at 0% and just gets stuck there. </p>
  
  <p>Is there any way to do this? </p>
  
  <p>By the way, the Amazon URL I pass in contains the <code>AWSAccessKeyId</code>, <code>Expires</code>, and <code>Signature</code> parameters. The url looks like this:</p>
  
  <pre><code>https://bucket-name.s3-us-west-2.amazonaws.com/uploads/app/apk/22/app.apk?AWSAccessKeyId=""&amp;Expires=""&amp;Signature=""
  </code></pre>