2

I'm downloading the .txt, .doc, .pdf etc files from my android application. Its working fine in all devices but I'm unable to download the files in S6 device.

I have used the following code let me know if any changes/modification required.

    DownloadManager.Request request = new DownloadManager.Request(
                            Uri.parse(url));
    request.setDescription(arrayList2.get(arg2).get(
                            "doctypedesc"));
    request.setTitle(arrayList2.get(arg2)
                            .get("docfilename"));

    request.setDestinationInExternalPublicDir(
                            Environment.DIRECTORY_DOWNLOADS, arrayList2
                                    .get(arg2).get("docfilename"));
    DownloadManager manager = (DownloadManager)getSystemService(Context.DOWNLOAD_SERVICE);
    manager.enqueue(request);
halfer
  • 19,824
  • 17
  • 99
  • 186
user3349857
  • 61
  • 1
  • 3

0 Answers0