{"id":17632382,"url":"https://github.com/amitshekhariitbhu/rxjava2-android-samples","last_synced_at":"2025-05-14T09:06:55.492Z","repository":{"id":39617577,"uuid":"66704088","full_name":"amitshekhariitbhu/RxJava2-Android-Samples","owner":"amitshekhariitbhu","description":"RxJava 2 Android Examples - How to use RxJava 2 in Android","archived":false,"fork":false,"pushed_at":"2024-07-07T04:03:28.000Z","size":498,"stargazers_count":4952,"open_issues_count":17,"forks_count":1065,"subscribers_count":186,"default_branch":"master","last_synced_at":"2025-04-10T11:02:01.784Z","etag":null,"topics":["android","example","examples","migrations","rxandroid","rxjava","rxjava2","sample","samples","tutorial","tutorials"],"latest_commit_sha":null,"homepage":"https://outcomeschool.com","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/amitshekhariitbhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":["amitshekhariitbhu"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2016-08-27T08:21:37.000Z","updated_at":"2025-04-10T06:34:00.000Z","dependencies_parsed_at":"2024-10-23T06:28:47.801Z","dependency_job_id":"f1e8528b-435f-4533-9286-5b3e61f89e95","html_url":"https://github.com/amitshekhariitbhu/RxJava2-Android-Samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitshekhariitbhu%2FRxJava2-Android-Samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitshekhariitbhu%2FRxJava2-Android-Samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitshekhariitbhu%2FRxJava2-Android-Samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitshekhariitbhu%2FRxJava2-Android-Samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitshekhariitbhu","download_url":"https://codeload.github.com/amitshekhariitbhu/RxJava2-Android-Samples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"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","example","examples","migrations","rxandroid","rxjava","rxjava2","sample","samples","tutorial","tutorials"],"created_at":"2024-10-23T01:07:01.125Z","updated_at":"2025-05-14T09:06:55.463Z","avatar_url":"https://github.com/amitshekhariitbhu.png","language":"Java","funding_links":["https://github.com/sponsors/amitshekhariitbhu"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=https://raw.githubusercontent.com/amitshekhariitbhu/RxJava2-Android-Samples/master/assets/rxjava2.png \u003e\n\n# Learning RxJava 2 for Android by example\n\n### This project is for : \n* who is migrating to RxJava 2 \n* or just started with RxJava.\n\n## About me\n\nHi, I am Amit Shekhar, Co-Founder @ [Outcome School](https://outcomeschool.com) • IIT 2010-14 • I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.\n\nYou can connect with me on:\n\n- [Twitter](https://twitter.com/amitiitbhu)\n- [YouTube](https://www.youtube.com/@amitshekhar)\n- [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu)\n- [GitHub](https://github.com/amitshekhariitbhu)\n\n## Join **Outcome School** and get high paying tech job: [Outcome School](https://outcomeschool.com)\n\n### Just Build the project and start learning RxJava by examples.\n\nRxJava 2.0 has been completely rewritten from scratch on top of the Reactive-Streams specification. The specification itself has evolved out of RxJava 1.x and provides a common baseline for reactive systems and libraries.\n\n### Using RxJava 2.0 Library in your application\n\nAdd this in your build.gradle\n```groovy\ncompile 'io.reactivex.rxjava2:rxjava:X.X.X'\n```\nIf you are using RxAndroid also, then add the following\n```groovy\ncompile 'io.reactivex.rxjava2:rxandroid:X.X.X'\n```\n\n# RxJava 2 Operators Examples present in this sample project:\n\n* `Map` -\u003e transform the items emitted by an Observable by applying a function to each item. Blog: [RxJava Operator Map vs FlatMap](https://outcomeschool.com/blog/rxjava-map-vs-flatmap)\n* `Zip` -\u003e combine the emissions of multiple Observables together via a specified function and emit single items for each combination based on the results of this function\n* `Filter` -\u003e emit only those items from an Observable that pass a predicate test\n* `FlatMap` -\u003e transform the items emitted by an Observable into Observables, then flatten the emissions from those into a single Observable. Blog: [RxJava Operator Map vs FlatMap](https://outcomeschool.com/blog/rxjava-map-vs-flatmap)\n* `Take` -\u003e emit only the first n items emitted by an Observable. [Blog for reference](https://outcomeschool.com/blog/rxjava-interval-operator)\n* `Reduce` -\u003e apply a function to each item emitted by an Observable, sequentially, and emit the final value\n* `Skip` -\u003e suppress the first n items emitted by an Observable\n* `Buffer` -\u003e periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a time\n* `Concat` -\u003e emit the emissions from two or more Observables without interleaving them. [Blog for reference](https://outcomeschool.com/blog/rxjava-concat-operator)\n* `Replay` -\u003e ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting items\n* `Merge` -\u003e combine multiple Observables into one by merging their emissions\n* `SwitchMap` -\u003e transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable\n\n\n# Highlights of the examples :\n\n* [DisposableExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/DisposableExampleActivity.java) - Using `CompositeDisposable`. [Blog for reference](https://outcomeschool.com/blog/dispose-vs-clear-compositedisposable-rxjava)\n* [FlowableExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/FlowableExampleActivity.java) - Using `Flowable` and `reduce` operator\n* [SingleObserverExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/SingleObserverExampleActivity.java) - Using `SingleObserver`\n* [CompletableObserverActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/CompletableObserverExampleActivity.java) - Using `CompletableObserver`\n* [MapExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/MapExampleActivity.java) - Using `map` Operator. Blog: [RxJava Operator Map vs FlatMap](https://outcomeschool.com/blog/rxjava-map-vs-flatmap)\n* [ZipExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/ZipExampleActivity.java) - Using `zip` Operator\n* [BufferExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/BufferExampleActivity.java) - Using `buffer` Operator\n* [TakeExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/TakeExampleActivity.java) - Using `take` Operator. [Blog for reference](https://outcomeschool.com/blog/rxjava-interval-operator)\n* [ReduceExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/ReduceExampleActivity.java) - Using `reduce` Operator\n* [FilterExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/FilterExampleActivity.java) - Using `filter` Operator\n* [SkipExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/SkipExampleActivity.java) - Using `skip` Operator\n* [ReplayExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/ReplayExampleActivity.java) - Using `replay` Operator\n* [ConcatExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/ConcatExampleActivity.java) - Using `concat` Operator. [Blog for reference](https://outcomeschool.com/blog/rxjava-concat-operator)\n* [MergeExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/MergeExampleActivity.java) - Using `merge` Operator\n* [DeferExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/DeferExampleActivity.java) - Using `defer` Observable\n* [SwitchMapExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/SwitchMapExampleActivity.java) - Using `switchMap` Observable\n* [IntervalExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/IntervalExampleActivity.java) - Using `Interval`. [Blog for reference](https://outcomeschool.com/blog/rxjava-interval-operator)\n* [RxBusActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/rxbus/RxBusActivity.java) - RxBus, RxJava2Bus, EventBus, RxEventBus\n* [PaginationActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/pagination/PaginationActivity.java) - Pagination for loadMore in RecyclerView. Blog: [Pagination In RecyclerView Using RxJava Operators](https://outcomeschool.com/blog/pagination-in-recyclerview-using-rxjava-operators)\n* [ComposeOperatorExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/compose/ComposeOperatorExampleActivity.java) - Compose operator for reusable\n* [Search Implementation](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/search/SearchActivity.java) - Using `debounce`, `switchMap`, `distinctUntilChanged`\n* [Implement Caching Using RxJava Operators](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/cache/CacheExampleActivity.java) - Using `concat`, `firstElement`\n* [PublishSubjectExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/PublishSubjectExampleActivity.java). Blog: [RxJava Subject - Publish, Replay, Behavior, and Async](https://outcomeschool.com/blog/rxjava-subject-publish-replay-behavior-async)\n\n### Find this project useful ? :heart:\n* Support it by clicking the :star: button on the upper right of this page. :v:\n\nThanks\n\n**Amit Shekhar**\\\nCo-Founder @ [Outcome School](https://outcomeschool.com)\n\nYou can connect with me on:\n\n- [Twitter](https://twitter.com/amitiitbhu)\n- [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu)\n- [GitHub](https://github.com/amitshekhariitbhu)\n- [Facebook](https://www.facebook.com/amit.shekhar.iitbhu)\n\n[**Read all of our blogs here.**](https://outcomeschool.com/blog)\n\n### License\n```\n   Copyright (C) 2024 Amit Shekhar\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### Contributing to RxJava 2 Android Samples\nJust make pull request. You are in!\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitshekhariitbhu%2Frxjava2-android-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitshekhariitbhu%2Frxjava2-android-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitshekhariitbhu%2Frxjava2-android-samples/lists"}