[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-7310":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":17,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},7310,"RxDownload","ssseasonnn\u002FRxDownload","ssseasonnn","A multi-threaded download tool written with RxJava and Kotlin","",null,"Kotlin",4125,613,110,45,0,1,60.96,"Apache License 2.0",false,"master",true,[24,25,26],"kotlin","rxdownload","rxjava","2026-06-12 04:00:33","![](usage.png)\n\n# RxDownload\n\n![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-kotlin-brightgreen.svg) ![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRxJava-2.0-blue.svg)\n\n[![](https:\u002F\u002Fjitpack.io\u002Fv\u002Fssseasonnn\u002FRxDownload.svg)](https:\u002F\u002Fjitpack.io\u002F#ssseasonnn\u002FRxDownload)\n\nA multi-threaded download tool written with RxJava and Kotlin\n\n*Read this in other languages: [中文](README.ch.md), [English](README.md), [Changelog](CHANGELOG.md)* \n\n## Prepare\n\n- Add jitpack repo:\n\n    ```gradle\n    maven { url 'https:\u002F\u002Fjitpack.io' }\n    \n- Add RxDownload dependency:\n\n    ```gradle\n    \u002F\u002FLoad on demand\n    implementation \"com.github.ssseasonnn.RxDownload:rxdownload4:1.1.4\"\n    implementation \"com.github.ssseasonnn.RxDownload:rxdownload4-manager:1.1.4\"\n    implementation \"com.github.ssseasonnn.RxDownload:rxdownload4-notification:1.1.4\"\n    implementation \"com.github.ssseasonnn.RxDownload:rxdownload4-recorder:1.1.4\"\n    \n    or: \n    \u002F\u002FAdd all dependencies of RxDownload4\n    implementation \"com.github.ssseasonnn:RxDownload:1.1.4\"\n    ```\n\n## Basic Usage\n\n- Start download:\n\n    ```kotlin\n    disposable = url.download()\n            .observeOn(AndroidSchedulers.mainThread())\n            .subscribeBy(\n                    onNext = { progress ->\n                        \u002F\u002Fdownload progress\n                        button.text = \"${progress.downloadSizeStr()}\u002F${progress.totalSizeStr()}\"\n                        button.setProgress(progress)\n                    },\n                    onComplete = {\n                        \u002F\u002Fdownload complete\n                        button.text = \"Open\"\n                    },\n                    onError = {\n                        \u002F\u002Fdownload failed\n                        button.text = \"Retry\"\n                    }\n            )    \n    ```\n\n- Stop download:\n\n    ```kotlin\n    disposable.dispose()    \n    ```\n    \n- Get download file:\n\n    ```kotlin\n    val file = url.file()\n    \u002F\u002F or\n    val file = task.file() \n    \u002F\u002F use file...   \n    ```\n    \n- Delete download files:\n\n    ```kotlin\n    url.delete()\n    \u002F\u002F or\n    task.delete() \n    ```\n\n## Task Manager\n\n- Get a TaskManager object:\n\n    ```kotlin\n    val taskManager = url.manager()\n    ```\n    \n- Subscribe to status update:\n\n    ```kotlin\n   \u002F\u002Fkeep this tag for dispose\n   val tag = taskManager.subscribe { status ->\n        \u002F\u002F Receive download status\n        when (status) {\n            is Normal -> {}\n            is Started -> {}\n            is Downloading -> {}\n            is Paused -> {}\n            is Completed -> {}\n            is Failed -> {}\n            is Deleted -> {}\n        }\n    }\n        \n    ``` \n    \n    > **progress** can be obtained from **status**, when status is **Failed**, \n    you can get **throwable** from it, which is the reason for the failure.\n    \n- Cancel status update subscription:\n\n    ```kotlin\n    \u002F\u002Fdispose tag\n    taskManager.dispose(tag)\n    ```\n    \n- Start download:\n\n    ```kotlin\n    taskManager.start()\n    ```\n\n- Stop download:\n\n    ```kotlin\n    taskManager.stop()\n    ```\n    \n- Delete download:\n\n    ```kotlin\n    taskManager.delete()\n    ```\n\n- Get download file:\n\n    ```kotlin\n    val file = taskManager.file() \n    \u002F\u002F use file...   \n    ```\n    \n## Task Recorder\n\n- Query single task:\n\n    ```kotlin\n     \u002F\u002F Query task with url\n     RxDownloadRecorder.getTask(\"url\")\n           .observeOn(AndroidSchedulers.mainThread())\n           .subscribeBy { TaskEntity ->\n               \u002F\u002F TaskEntity                        \n           } \n    ``` \n    \n- Query a batch of tasks:\n\n    ```kotlin\n     \u002F\u002F Query task with urls\n     RxDownloadRecorder.getTaskList(\"url1\",\"url2\",\"url3\")\n           .observeOn(AndroidSchedulers.mainThread())\n           .subscribeBy { list ->\n               \u002F\u002F list of TaskEntity                        \n           } \n    ```    \n    \n- Get a list of all downloads:\n\n    ```kotlin\n     RxDownloadRecorder.getAllTask()\n           .observeOn(AndroidSchedulers.mainThread())\n           .subscribeBy { list ->\n               \u002F\u002Flist of TaskEntity                        \n           }\n    ```\n    \n- Query all download records for a state:\n\n    ```kotlin\n     \u002F\u002F Query all Completed records\n     RxDownloadRecorder.getAllTaskWithStatus(Completed())\n           .observeOn(AndroidSchedulers.mainThread())\n           .subscribeBy { list ->\n               \u002F\u002Flist of TaskEntity                        \n           } \n    ``` \n    \n- Paging query download record list:\n\n    ```kotlin\n     RxDownloadRecorder.getTaskList(page, pageSize)\n           .observeOn(AndroidSchedulers.mainThread())\n           .subscribeBy { list ->\n               \u002F\u002Flist of TaskEntity                        \n           }\n    ```\n    \n- Paging query list of download records in a certain state:\n\n    ```kotlin\n     \u002F\u002F Get the list of pages that have been Completed\n     RxDownloadRecorder.getTaskListWithStatus(Completed(), page, pageSize)\n           .observeOn(AndroidSchedulers.mainThread())\n           .subscribeBy { list ->\n               \u002F\u002Flist of TaskEntity                        \n           }\n    ```\n\n    > **TaskEntity** has a **abnormalExit** field, \n    which is used to indicate whether the Task has paused by the APP forced close.\n\n- Start All:\n\n    ```kotlin\n     RxDownloadRecorder.startAll()\n    ```\n    \n- Stop All:\n\n    ```kotlin\n     RxDownloadRecorder.stopAll()\n    ```\n    \n- Delete All:\n\n    ```kotlin\n     RxDownloadRecorder.deleteAll()\n    ```\n\n## License\n\n> ```\n> Copyright 2019 Season.Zlc\n>\n> Licensed under the Apache License, Version 2.0 (the \"License\");\n> you may not use this file except in compliance with the License.\n> You may obtain a copy of the License at\n>\n>    http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n>\n> Unless required by applicable law or agreed to in writing, software\n> distributed under the License is distributed on an \"AS IS\" BASIS,\n> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n> See the License for the specific language governing permissions and\n> limitations under the License.\n> ```\n","RxDownload 是一个基于 RxJava 和 Kotlin 编写的多线程下载工具。它利用了 RxJava 的响应式编程特性，支持断点续传、进度监听和任务管理等功能，使得开发者能够轻松地实现高效稳定的文件下载。该库特别适用于需要在 Android 应用中集成下载功能的场景，如应用内资源更新、用户内容下载等。通过简洁的 API 设计，RxDownload 提供了从添加依赖到开始下载的一站式解决方案，并且支持自定义下载通知样式以及记录下载历史，方便用户管理和恢复下载任务。",2,"2026-06-11 03:11:43","top_language"]