{"record":{"id":"f6de25b5d7e937ef","repo":"lingochamp/FileDownloader","slug":"this-value-is-used-in-the-filedownloader-process","errorCode":null,"errorMessage":"This value is used in the :filedownloader process, so set this value in your process is without effect. You can add 'process.non-separate=true' in 'filedownloader.properties' to share the main process to FileDownloadService. Or you can configure this value in 'filedownloader.properties' by 'download.min-progress-step'.","messagePattern":"This value is used in the :filedownloader process, so set this value in your process is without effect\\. You can add 'process\\.non-separate=true' in 'filedownloader\\.properties' to share the main process to FileDownloadService\\. Or you can configure this value in 'filedownloader\\.properties' by 'download\\.min-progress-step'\\.","errorType":"exception","errorClass":"IllegalAccessException","httpStatus":null,"severity":"error","filePath":"library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java","lineNumber":83,"sourceCode":"     * @param minProgressStep The minimum bytes interval in per step to sync to the file and the\n     *                        database.\n     *                        <p>\n     *                        Used for adjudging whether is time to sync the downloaded so far bytes\n     *                        to database and make sure sync the downloaded buffer to local file.\n     *                        <p/>\n     *                        More smaller more frequently, then download more slowly, but will more\n     *                        safer in scene of the process is killed unexpected.\n     *                        <p/>\n     *                        Default 65536, which follow the value in\n     *                        com.android.providers.downloads.Constants.\n     * @see com.liulishuo.filedownloader.download.DownloadStatusCallback#onProgress(long)\n     * @see #setMinProgressTime(long)\n     */\n    public static void setMinProgressStep(int minProgressStep) throws IllegalAccessException {\n        if (isDownloaderProcess(FileDownloadHelper.getAppContext())) {\n            FileDownloadUtils.minProgressStep = minProgressStep;\n        } else {\n            throw new IllegalAccessException(\"This value is used in the :filedownloader process,\"\n                    + \" so set this value in your process is without effect. You can add \"\n                    + \"'process.non-separate=true' in 'filedownloader.properties' to share the main\"\n                    + \" process to FileDownloadService. Or you can configure this value in \"\n                    + \"'filedownloader.properties' by 'download.min-progress-step'.\");\n        }\n    }\n\n    /**\n     * @param minProgressTime The minimum millisecond interval in per time to sync to the file and\n     *                        the database.\n     *                        <p>\n     *                        Used for adjudging whether is time to sync the downloaded so far bytes\n     *                        to database and make sure sync the downloaded buffer to local file.\n     *                        <p/>\n     *                        More smaller more frequently, then download more slowly, but will more\n     *                        safer in scene of the process is killed unexpected.\n     *                        <p/>\n     *                        Default 2000, which follow the value in","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/lingochamp/FileDownloader/blob/6237a8cac174bcc916e4342b14ab1ab72a5768d4/library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java#L65-L101","documentation":"FileDownloadUtils.setMinProgressStep() only has effect inside the :filedownloader download process. Calling it from the main (non-downloader) process throws IllegalAccessException because the value would be ignored there anyway.","triggerScenarios":"Calling FileDownloadUtils.setMinProgressStep(int) in an app running in the default separate-process mode (process.non-separate not set to true), from any process other than the one hosting FileDownloadService.","commonSituations":"Configuring the downloader from Application.onCreate in the main process while downloads run in the separate :filedownloader process; forgetting the library defaults to a separate process.","solutions":["Set 'process.non-separate=true' in assets/filedownloader.properties so the downloader runs in the main process and the setter takes effect","Configure the value statically in assets/filedownloader.properties via 'download.min-progress-step=<n>' instead of calling the setter","Wrap the call in a check of FileDownloadUtils.isDownloaderProcess(context) and only set it when true"],"exampleFix":"// before\nFileDownloadUtils.setMinProgressStep(8192);\n// after\n// assets/filedownloader.properties\ndownload.min-progress-step=8192","handlingStrategy":"try-catch","validationCode":"if (FileDownloadUtils.isDownloaderProcess(context)) {\n    FileDownloadUtils.setMinProgressStep(8192);\n}","typeGuard":null,"tryCatchPattern":"try {\n    FileDownloadUtils.setMinProgressStep(8192);\n} catch (IllegalAccessException e) {\n    // running in the main process; set download.min-progress-step in\n    // filedownloader.properties instead\n}","preventionTips":["Prefer configuring download.min-progress-step in filedownloader.properties over the runtime setter","Remember the library defaults to a separate :filedownloader process","Check FileDownloadUtils.isDownloaderProcess(context) before calling process-scoped setters"],"tags":["android","filedownloader","process","configuration"],"backgroundTag":"wrong-process-config-call","analyzedSha":"6237a8cac174bcc916e4342b14ab1ab72a5768d4","analyzedAt":"2026-09-08T23:50:48.168Z","contentChangedAt":"2026-09-08T23:50:48.168Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}