{"id":20881457,"url":"https://github.com/js-bhavyansh/filedownloader","last_synced_at":"2026-05-21T12:08:15.168Z","repository":{"id":258948590,"uuid":"849888119","full_name":"js-bhavyansh/FileDownloader","owner":"js-bhavyansh","description":"A simple Android app demonstrating file download management using the Ketch library with progress tracking and control features.","archived":false,"fork":false,"pushed_at":"2024-08-30T14:57:55.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-19T10:08:02.319Z","etag":null,"topics":["android-studio","file-downloader","jetpack-compose","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/js-bhavyansh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-30T13:01:57.000Z","updated_at":"2024-08-30T14:58:55.000Z","dependencies_parsed_at":"2024-10-22T08:56:43.952Z","dependency_job_id":null,"html_url":"https://github.com/js-bhavyansh/FileDownloader","commit_stats":null,"previous_names":["js-bhavyansh/filedownloader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bhavyansh%2FFileDownloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bhavyansh%2FFileDownloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bhavyansh%2FFileDownloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/js-bhavyansh%2FFileDownloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/js-bhavyansh","download_url":"https://codeload.github.com/js-bhavyansh/FileDownloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243258498,"owners_count":20262300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-studio","file-downloader","jetpack-compose","kotlin"],"created_at":"2024-11-18T07:24:56.609Z","updated_at":"2025-12-25T12:25:27.725Z","avatar_url":"https://github.com/js-bhavyansh.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Downloader App\n\nThis Android app demonstrates how to implement a file download manager using the **Ketch** library. The app supports features like downloading, pausing, resuming, retrying, and deleting downloads. It also provides real-time updates on download progress, status, and file size.\n\n## Features\n\n- Download files with a custom file name and path.\n- Monitor download progress and status.\n- Pause, resume, cancel, and retry downloads.\n- Display downloaded file size in megabytes.\n- Delete downloaded files and reset download progress.\n\n## Screenshot\n\n\u003cdiv style=\"display: flex; justify-content: center; align-items: center;\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/c07c52b1-4cc2-4f3f-aa37-c6c37df2d824\" alt=\"First Screenshot\" style=\"width: 200px; height: auto; margin-right: 10px;\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/0f7bc44f-f6a8-4836-9c3d-2e4de62fb4c2\" alt=\"Second Screenshot\" style=\"width: 200px; height: auto; margin-right: 10px;\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/55daa80a-86ba-41d4-87e4-a3635f83b005\" alt=\"Third Screenshot\" style=\"width: 200px; height: auto;\"\u003e\n\u003c/div\u003e\n\n\u003cdiv style=\"display: flex; justify-content: center; align-items: center;\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/0553b452-fade-4ef8-b9f7-01b1a919d75b\" alt=\"Fourth Screenshot\" style=\"width: 200px; height: auto; margin-right: 10px;\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/7070ee98-4b95-4165-8ded-02add2151c52\" alt=\"Fifth Screenshot\" style=\"width: 200px; height: auto;\"\u003e\n\u003c/div\u003e\n\n## Code Overview\n\nThe main implementation is in the `MainActivity.kt` file. Below is a highlighted section of the code that manages the download process:\n\n```kotlin\n// Ketch initialization\nketch = Ketch.builder()\n    .setNotificationConfig(\n        NotificationConfig(\n            enabled = true,\n            smallIcon = R.drawable.ic_launcher_foreground\n        )\n    )\n    .setDownloadConfig(\n        DownloadConfig(\n            connectTimeOutInMs = 15000,\n            readTimeOutInMs = 15000\n        )\n    )\n    .build(this)\n\n// Start the download\nketch.download(\n    tag = FILE_TAG,\n    url = DOWNLOAD_URL,\n    fileName = FILE_NAME,\n    path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).path // Saving downloaded file in specific folder\n)\n\n// Monitor the download progress\nketch.observeDownloadByTag(tag = FILE_TAG)\n    .collect { downloadModel -\u003e\n        for (model in downloadModel) {\n            status = model.status\n            progress = model.progress\n            total = model.total\n        }\n    }\n\n// Convert bytes to megabytes\nfun calculateDownloadedMegabytes(progress: Int, total: Long): String {\n    val downloadedBytes = progress / 100.0 * total\n    return getTwoDecimals(value = downloadedBytes / (1024.0 * 1024.0))\n}\n```\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.\n\n1. Fork the repository.\n2. Create your feature branch (`git checkout -b feature/your-feature`).\n3. Commit your changes (`git commit -am 'Add some feature'`).\n4. Push to the branch (`git push origin feature/your-feature`).\n5. Create a new Pull Request.\n\n## Contact\n\nFor questions or feedback, please contact [@Bhavyansh03-tech](https://github.com/Bhavyansh03-tech) on GitHub or connect with me on [LinkedIn](https://www.linkedin.com/in/bhavyansh03/).\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-bhavyansh%2Ffiledownloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-bhavyansh%2Ffiledownloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-bhavyansh%2Ffiledownloader/lists"}