{"id":15352703,"url":"https://github.com/therajanmaurya/rxbus-kotlin-example","last_synced_at":"2025-04-15T05:52:20.875Z","repository":{"id":82380575,"uuid":"141988206","full_name":"therajanmaurya/RxBus-Kotlin-Example","owner":"therajanmaurya","description":"RxBus Kotlin","archived":false,"fork":false,"pushed_at":"2018-07-23T18:38:04.000Z","size":214,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T05:52:15.583Z","etag":null,"topics":["kotlin","kotlin-android","rxbus2","rxjava2"],"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/therajanmaurya.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":"2018-07-23T08:55:39.000Z","updated_at":"2021-07-14T14:51:06.000Z","dependencies_parsed_at":"2023-03-02T08:15:58.122Z","dependency_job_id":null,"html_url":"https://github.com/therajanmaurya/RxBus-Kotlin-Example","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"300287f6dafd001df39a75f34e45471580211a8d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therajanmaurya%2FRxBus-Kotlin-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therajanmaurya%2FRxBus-Kotlin-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therajanmaurya%2FRxBus-Kotlin-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therajanmaurya%2FRxBus-Kotlin-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/therajanmaurya","download_url":"https://codeload.github.com/therajanmaurya/RxBus-Kotlin-Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016317,"owners_count":21198832,"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":["kotlin","kotlin-android","rxbus2","rxjava2"],"created_at":"2024-10-01T12:10:12.238Z","updated_at":"2025-04-15T05:52:20.847Z","avatar_url":"https://github.com/therajanmaurya.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RxBus-Kotlin-Example\n![RxBus Example](art/RxBus.png)\n\nMedium Blog -\u003e https://medium.com/@therajanmaurya/rxbus-kotlin-listen-where-ever-you-want-e6fc0760a4a8\n\nUsage\n-----\n\nAdd [RxBus](RxBus.kt) and [RxEvent](RxEvent.kt) class in your project and you are done.\n\n**To Publish Event**\n\n```kt\nRxBus.publish(RxEvent.EventAddPerson(etPersonName.text.toString()))\n```\n\n**To Listen Event**\n\n```kt\nclass MainActivity : AppCompatActivity() {\n\n    private lateinit var disposable: Disposable\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        disposable = RxBus.listen(RxEvent.EventAddPerson::class.java).subscribe {\n            adapter.addPerson(person = it.personName) // whatever you wanna do with data\n        }\n    }\n\n    override fun onDestroy() {\n        super.onDestroy()\n        if (!disposable.isDisposed) disposable.dispose()\n    }\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherajanmaurya%2Frxbus-kotlin-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftherajanmaurya%2Frxbus-kotlin-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherajanmaurya%2Frxbus-kotlin-example/lists"}