Is there a way to download a file from an S3 bucket using Android's DownloadManager?
I can currently download an apk file from Dropbox doing this:
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);
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.
Is there any way to do this?
By the way, the Amazon URL I pass in contains the AWSAccessKeyId, Expires, and Signature parameters. The URL looks like this:
https://bucket-name.s3-us-west-2.amazonaws.com/uploads/app/apk/22/app.apk?AWSAccessKeyId=""&Expires=""&Signature=""