Retour au classement

amitshekhariitbhu/RxJava2-Android-Samples

Javaoutcomeschool.com

RxJava 2 Android Examples - How to use RxJava 2 in Android

rxjavaandroidrxjava2rxandroidexamplesampletutorialtutorialsexamplessamplesmigrations
Croissance des étoiles
Étoiles
4.9k
Forks
1k
Croissance hebdomadaire
Issues
12
2k4k
août 2016nov. 2019mars 2023juil. 2026
ArtefactsMavengit clone https://github.com/amitshekhariitbhu/RxJava2-Android-Samples.git
README

Learning RxJava 2 for Android by example

This project is for :

  • who is migrating to RxJava 2
  • or just started with RxJava.

About me

Hi, I am Amit Shekhar, Founder @ Outcome School • 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.

Follow Amit Shekhar

Follow Outcome School

I teach at Outcome School

  • AI and Machine Learning
  • Android

Join Outcome School and get a high-paying tech job: Outcome School

Just Build the project and start learning RxJava by examples.

RxJava 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.

Using RxJava 2.0 Library in your application

Add this in your build.gradle

compile 'io.reactivex.rxjava2:rxjava:X.X.X'

If you are using RxAndroid also, then add the following

compile 'io.reactivex.rxjava2:rxandroid:X.X.X'

RxJava 2 Operators Examples present in this sample project:

  • Map -> transform the items emitted by an Observable by applying a function to each item. Blog: RxJava Operator Map vs FlatMap
  • Zip -> 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
  • Filter -> emit only those items from an Observable that pass a predicate test
  • FlatMap -> 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
  • Take -> emit only the first n items emitted by an Observable. Blog for reference
  • Reduce -> apply a function to each item emitted by an Observable, sequentially, and emit the final value
  • Skip -> suppress the first n items emitted by an Observable
  • Buffer -> periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a time
  • Concat -> emit the emissions from two or more Observables without interleaving them. Blog for reference
  • Replay -> ensure that all observers see the same sequence of emitted items, even if they subscribe after the Observable has begun emitting items
  • Merge -> combine multiple Observables into one by merging their emissions
  • SwitchMap -> transform the items emitted by an Observable into Observables, and mirror those items emitted by the most-recently transformed Observable

Highlights of the examples :

Find this project useful ? :heart:

  • Support it by clicking the :star: button on the upper right of this page. :v:

Thanks

Amit Shekhar
Co-Founder @ Outcome School

You can connect with me on:

Read all of our blogs here.

License

   Copyright (C) 2024 Amit Shekhar

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Contributing to RxJava 2 Android Samples

Just make pull request. You are in!

Dépôts similaires
ReactiveX/RxJava

RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.

JavaMavenApache License 2.0javarxjava
dsc.gg/rxjava
48.2k7.6k
hehonghui/android-tech-frontier

【停止维护】一个定期翻译国外Android优质的技术、开源库、软件架构设计、测试等文章的开源项目

Apache License 2.0android-testingrxjava
blog.csdn.net/bboyfeiyu
10.6k3.3k
jeasonlzy/okhttp-OkGo

OkGo - 3.0 震撼来袭,该库是基于 Http 协议,封装了 OkHttp 的网络请求框架,比 Retrofit 更简单易用,支持 RxJava,RxJava2,支持自定义缓存,支持批量断点下载管理和批量上传管理功能

JavaMavenApache License 2.0okhttpokgo
10.6k2.5k
tbruyelle/RxPermissions

Android runtime permissions powered by RxJava2

JavaMavenApache License 2.0rxjavaandroid
10.4k1.4k
JessYanCoding/MVPArms

⚔️ A common architecture for Android applications developing based on MVP, integrates many open source projects, to make your developing quicker and easier (一个整合了大量主流开源项目高度可配置化的 Android MVP 快速集成框架).

JavaMavenApache License 2.0mvprxjava
10.2k2.4k
ColorfulCat/AndroidLibs

:fire:正在成为史上最全分类 Android 开源大全~~~~(长期更新 Star 一下吧)

Apache License 2.0androidlibrary
xcube.cn
8k1.6k
goldze/MVVMHabit

👕基于谷歌最新AAC架构,MVVM设计模式的一套快速开发库,整合Okhttp+RxJava+Retrofit+Glide等主流模块,满足日常开发需求。使用该框架可以快速开发一个高质量、易维护的Android应用。

JavaMavenApache License 2.0mvvmdatabinding
7.7k1.7k
kaushikgopal/RxJava-Android-Samples

Learning RxJava for Android by example

JavaMavenApache License 2.0rxjavajava
7.5k1.4k
ReactiveX/RxKotlin

RxJava bindings for Kotlin

KotlinApache License 2.0kotlinrxjava
7k456
smuyyh/BookReader

:closed_book: "任阅" 网络小说阅读器,3D翻页效果、txt/pdf/epub书籍阅读、Wifi传书~

JavaMavenApache License 2.0readerbookreader
6.9k1.9k
getActivity/AndroidProject

Android 技术中台,但愿人长久,搬砖不再有

JavaMavenApache License 2.0androidmvp
6.9k1.4k
TeamAmaze/AmazeFileManager

Material design file manager for Android

KotlinGNU General Public License v3.0androidmobile
teamamaze.xyz
6.3k1.7k