MultiThreadDownload icon indicating copy to clipboard operation
MultiThreadDownload copied to clipboard

can not start Downloading File when set path private folder in Sd card

Open sajadmartiny opened this issue 9 years ago • 1 comments

When you download a file size of 1 GB is greater ,status in connection mode and do not start downloading and return error ,any solution for it?

return java.io.IOException: unexpected end of stream in onFailed

sajadmartiny avatar Aug 18 '16 05:08 sajadmartiny

use below codes to get external sdcard space : for your app , android OS just allow you to access to your app data folder in external sdcard , not root of it.

          File[] Dirs = ContextCompat.getExternalFilesDirs(that, null);
            if (Dirs.length > 1) {
                setDownloadDirectory(Dirs[1].getAbsolutePath());
            } else {
                Toast.makeText(that, "can not find external sdcard !", Toast.LENGTH_LONG).show();
            }

salehmosleh avatar Jan 30 '17 17:01 salehmosleh