{"id":3663,"url":"https://github.com/ReactiveX/RxAndroid","last_synced_at":"2025-08-11T03:32:51.407Z","repository":{"id":19834591,"uuid":"23095954","full_name":"ReactiveX/RxAndroid","owner":"ReactiveX","description":"RxJava bindings for Android","archived":false,"fork":false,"pushed_at":"2024-08-07T18:30:28.000Z","size":1045,"stargazers_count":19880,"open_issues_count":1,"forks_count":2942,"subscribers_count":989,"default_branch":"3.x","last_synced_at":"2024-12-08T16:45:24.095Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReactiveX.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2014-08-19T03:46:38.000Z","updated_at":"2024-12-08T13:52:42.000Z","dependencies_parsed_at":"2023-01-13T20:37:16.045Z","dependency_job_id":"a5aeb9dd-7d62-4530-8f3d-45a87bd2b27f","html_url":"https://github.com/ReactiveX/RxAndroid","commit_stats":{"total_commits":381,"total_committers":87,"mean_commits":4.379310344827586,"dds":0.7742782152230971,"last_synced_commit":"1873ab030b083e1353f07f68b82d470331c5feba"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReactiveX%2FRxAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReactiveX","download_url":"https://codeload.github.com/ReactiveX/RxAndroid/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229493353,"owners_count":18081613,"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":[],"created_at":"2024-01-05T20:16:47.894Z","updated_at":"2024-12-13T04:30:38.533Z","avatar_url":"https://github.com/ReactiveX.png","language":"Java","readme":"# RxAndroid: Reactive Extensions for Android\n\nAndroid specific bindings for [RxJava 3](http://github.com/ReactiveX/RxJava).\n\nThis module adds the minimum classes to RxJava that make writing reactive components in Android\napplications easy and hassle-free. More specifically, it provides a `Scheduler` that schedules on\nthe main thread or any given `Looper`.\n\n\n## Communication\n\nSince RxAndroid is part of the RxJava family the communication channels are similar:\n\n- Google Group: [RxJava][list]\n- Twitter: [@RxJava][twitter]\n- StackOverflow: [rx-android][so]\n- [GitHub Issues][issues]\n\n\n# Binaries\n\n```groovy\ndependencies {\n    implementation 'io.reactivex.rxjava3:rxandroid:3.0.2'\n    // Because RxAndroid releases are few and far between, it is recommended you also\n    // explicitly depend on RxJava's latest version for bug fixes and new features.\n    // (see https://github.com/ReactiveX/RxJava/releases for latest 3.x.x version)\n    implementation 'io.reactivex.rxjava3:rxjava:3.1.5'\n}\n```\n\n* RxAndroid: \u003ca href='http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.reactivex.rxjava3%22%20a%3A%22rxandroid%22'\u003e\u003cimg src='http://img.shields.io/maven-central/v/io.reactivex.rxjava3/rxandroid.svg'\u003e\u003c/a\u003e\n* RxJava: \u003ca href='http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.reactivex.rxjava3%22%20a%3A%22rxjava%22'\u003e\u003cimg src='http://img.shields.io/maven-central/v/io.reactivex.rxjava3/rxjava.svg'\u003e\u003c/a\u003e\n\nAdditional binaries and dependency information for can be found at [search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.reactivex.rxjava3%22%20a%3A%22rxandroid%22).\n\n\u003cdetails\u003e\n\u003csummary\u003eSnapshots of the development version are available in Sonatype's snapshots repository.\u003c/summary\u003e\n\u003cp\u003e\n\n```groovy\nrepositories {\n    mavenCentral()\n    maven {\n        url 'https://oss.sonatype.org/content/repositories/snapshots/'\n    }\n}\n\ndependencies {\n    implementation 'io.reactivex.rxjava3:rxandroid:3.1.0-SNAPSHOT'\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\n## Build\n\nTo build:\n\n```bash\n$ git clone git@github.com:ReactiveX/RxAndroid.git\n$ cd RxAndroid/\n$ ./gradlew build\n```\n\nFurther details on building can be found on the RxJava [Getting Started][start] page of the wiki.\n\n# Sample usage\n\nA sample project which provides runnable code examples that demonstrate uses of the classes in this\nproject is available in the `sample-app/` folder.\n\n## Observing on the main thread\n\nOne of the most common operations when dealing with asynchronous tasks on Android is to observe the task's\nresult or outcome on the main thread. Using vanilla Android, this would typically be accomplished with an\n`AsyncTask`. With RxJava instead you would declare your `Observable` to be observed on the main thread:\n\n```java\nObservable.just(\"one\", \"two\", \"three\", \"four\", \"five\")\n    .subscribeOn(Schedulers.newThread())\n    .observeOn(AndroidSchedulers.mainThread())\n    .subscribe(/* an Observer */);\n```\n\nThis will execute the `Observable` on a new thread, and emit results through `onNext` on the main thread.\n\n## Observing on arbitrary loopers\n\nThe previous sample is merely a specialization of a more general concept: binding asynchronous\ncommunication to an Android message loop, or `Looper`. In order to observe an `Observable` on an arbitrary\n`Looper`, create an associated `Scheduler` by calling `AndroidSchedulers.from`:\n\n```java\nLooper backgroundLooper = // ...\nObservable.just(\"one\", \"two\", \"three\", \"four\", \"five\")\n    .observeOn(AndroidSchedulers.from(backgroundLooper))\n    .subscribe(/* an Observer */)\n```\n\nThis will execute the Observable on a new thread and emit results through `onNext` on whatever thread is\nrunning `backgroundLooper`.\n\n\n## Bugs and Feedback\n\nFor bugs, feature requests, and discussion please use [GitHub Issues][issues].\nFor general usage questions please use the [mailing list][list] or [StackOverflow][so].\n\n\n## LICENSE\n\n    Copyright 2015 The RxAndroid authors\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://www.apache.org/licenses/LICENSE-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\n\n [list]: http://groups.google.com/d/forum/rxjava\n [so]: http://stackoverflow.com/questions/tagged/rx-android\n [twitter]: http://twitter.com/RxJava\n [issues]: https://github.com/ReactiveX/RxAndroid/issues\n [start]: https://github.com/ReactiveX/RxJava/wiki/Getting-Started\n","funding_links":[],"categories":["Functional Programming","1. Important library","Java","other","Index","Libraries","Library","Libs","Android 开发中的日常积累","Bindings","FRP","Cross-Platform Mobile Guide for Native iOS \u0026 Android Developers"],"sub_categories":["RxJava","Other","EventBus","一些原理分析的文章","\u003cA NAME=\"EventBus\"\u003e\u003c/A\u003eEventBus","RxJava\u0026\u0026RxAndroid\u0026\u0026agera学习资源","Android"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReactiveX%2FRxAndroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FReactiveX%2FRxAndroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FReactiveX%2FRxAndroid/lists"}