I'm using an android application to download a zipped file from my Google Drive account. The file loads 5MB but the emulator only downloads 65KB. According to this discussion (Android download file from PHP server) , this is a Cookie problem but I did not know how to add cookies. here is my code. Thank you.

void download(String url) {
        DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
        request.setDestinationInExternalFilesDir(this, Environment.DIRECTORY_DOCUMENTS, "doc.zip");
        DownloadManager downloadManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);

0 Answers