{"id":18048505,"url":"https://github.com/ch8n/asynctasker","last_synced_at":"2025-07-20T16:32:55.076Z","repository":{"id":140847442,"uuid":"206749188","full_name":"ch8n/AsyncTasker","owner":"ch8n","description":"Self Implemented Async Task, cause Async Task is deprecated","archived":false,"fork":false,"pushed_at":"2021-03-03T04:41:28.000Z","size":720,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T06:40:41.286Z","etag":null,"topics":["android","asynctask","java","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/ch8n.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":"2019-09-06T08:28:13.000Z","updated_at":"2021-03-03T04:41:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"871602ef-f498-4e33-b14d-adb5faf4a6c1","html_url":"https://github.com/ch8n/AsyncTasker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ch8n/AsyncTasker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ch8n%2FAsyncTasker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ch8n%2FAsyncTasker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ch8n%2FAsyncTasker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ch8n%2FAsyncTasker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ch8n","download_url":"https://codeload.github.com/ch8n/AsyncTasker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ch8n%2FAsyncTasker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266160371,"owners_count":23885883,"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","asynctask","java","kotlin"],"created_at":"2024-10-30T20:13:09.377Z","updated_at":"2025-07-20T16:32:55.058Z","avatar_url":"https://github.com/ch8n.png","language":"Kotlin","readme":"\u003ch1 align=\"center\"\u003e\u003ca href=\"https://chetangupta.net/\" target=\"_blank\"\u003eAndroidBites\u003c/a\u003e\n\u003c/h1\u003e\n\n![AndroidBites](./androidbites_space.jpg)\n\n## :hand: About\nHola Amigos! 🙌, welcome to my coding playground! go on explore around 👩‍💻\n\nDo let me know if you find something useful or want to suggest some improvement\nalso don't forget to checkout of blogs at [`chetangupta.net`](https://chetangupta.net/)\n\n## :eyes: Social\n[LinkedIn](https://bit.ly/ch8n-linkdIn) |\n[Medium](https://bit.ly/ch8n-medium-blog) |\n[Twitter](https://bit.ly/ch8n-twitter) |\n[StackOverflow](https://bit.ly/ch8n-stackOflow) |\n[CodeWars](https://bit.ly/ch8n-codewar) |\n[Portfolio](https://bit.ly/ch8n-home) |\n[Github](https://bit.ly/ch8n-git) |\n[Instagram](https://bit.ly/ch8n-insta) |\n[Youtube](https://bit.ly/ch8n-youtube)\n\n\n# AsyncTasker\n[Pooja's AsyncTask Challenge](https://pooja-srivs.medium.com/build-your-own-asynctask-fcfc4aaf0225) \nSelf Implemented Async Task for Pooja Srivs Challenge\n\n# API design\nThis is a sample project api design is similar to that of asyncTask,\n\n```Kotlin\nabstract class AsyncTasker\u003cParams, Progress, Result\u003e {\n\n    abstract fun doInBackground(vararg many: Params): Result\n    abstract fun onPostExecute(data: Result)\n    abstract fun onPreExecute()\n    abstract fun onProgressUpdate(progress: Progress)\n    \n    /** Extra function that is called when every task complete **/\n    abstract fun onCompleted(isInterrupted: Boolean)\n\n    /** controller function **/\n    fun execute(vararg many: Params) {\n      ... doing stuff\n    }\n\n    /** function that interrupt underlying worker thread for immediate cancel of task **/\n    fun cancel() {\n       ... doing stuff\n    }\n}\n\n```\n\nBehind the Back uses `HandlerThread` as worker thread and handler to perform the task.\n\n# Sample\n1. click fab to perform async task\n2. long click fab to perform cancel async task\n\n# TODO\n* test cases\n* flag to check background task is active\n\n\n## :cop: License\nShield: [![CC BY-SA 4.0][cc-by-sa-shield]][cc-by-sa]\n\nThis work is licensed under a\n[Creative Commons Attribution-ShareAlike 4.0 International License][cc-by-sa].\n\n[![CC BY-SA 4.0][cc-by-sa-image]][cc-by-sa]\n\n[cc-by-sa]: http://creativecommons.org/licenses/by-sa/4.0/\n[cc-by-sa-image]: https://licensebuttons.net/l/by-sa/4.0/88x31.png\n[cc-by-sa-shield]: https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fch8n%2Fasynctasker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fch8n%2Fasynctasker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fch8n%2Fasynctasker/lists"}