Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
1191414
Description for operators
amitshekhariitbhu Mar 14, 2017
1d44f0b
Add Paginator Example
amitshekhariitbhu Mar 15, 2017
27181b7
Update for Pagination for loadMore in RecyclerView
amitshekhariitbhu Mar 15, 2017
d8dbd3e
Add minor explanation for pagination
amitshekhariitbhu Mar 16, 2017
f06797d
Set VISIBLE_THRESHOLD to 1
amitshekhariitbhu Mar 18, 2017
dafe68a
Remove not required observeOn
amitshekhariitbhu Mar 18, 2017
eac1800
Simplify pagination example
amitshekhariitbhu Mar 18, 2017
d081a8b
Update Fast-Android-Networking to 1.0.0
amitshekhariitbhu Mar 19, 2017
f4c69bb
fix word spelling mistake in RxBus
RedStartGong Mar 28, 2017
2535c11
Merge pull request #16 from montycoding/master
amitshekhariitbhu Mar 28, 2017
b25817e
Add Join Mindorks Community Badge
amitshekhariitbhu Apr 21, 2017
ac69f07
Update README.md
amitshekhariitbhu May 7, 2017
e8fbc22
Update README.md
amitshekhariitbhu May 7, 2017
ce48977
Update gradle wrapper
WeRockStar May 19, 2017
d930e73
Add compose for reusable code
WeRockStar May 19, 2017
caac4fc
Add navigation to compose activity
WeRockStar May 19, 2017
0061559
Update README.md
WeRockStar May 19, 2017
0424f75
Merge pull request #19 from WeRockStar/ws
amitshekhariitbhu May 19, 2017
77b4be5
Add comments
IvanLepi May 29, 2017
79c6aa6
Merge pull request #20 from IvanLepi/comments-update
amitshekhariitbhu May 29, 2017
e54815a
Fix GitHub MD
amitshekhariitbhu Jun 19, 2017
e54dcad
Bump RxJava2 Version to 2.1.1
amitshekhariitbhu Jul 7, 2017
74a6a33
Update README.md RxJava version
WeRockStar Jul 31, 2017
3d472a9
Merge pull request #23 from WeRockStar/ws
amitshekhariitbhu Jul 31, 2017
84f1c3b
Add RxJava Course Link
amitshekhariitbhu Aug 3, 2017
fd135d5
Update README.md
amitshekhariitbhu Oct 13, 2017
91e7afc
Add search example
amitshekhariitbhu Oct 15, 2017
dc1cada
Add search implementation blog link
amitshekhariitbhu Oct 17, 2017
00da79f
Create CONTRIBUTING.md
amitshekhariitbhu Dec 3, 2017
1ff147f
Fix throttleFirst comment.
roman-yu Jan 16, 2018
443a141
Merge pull request #28 from roman-yu/roman/feature/fix_throttleFirst_…
amitshekhariitbhu Jan 16, 2018
1ef6be3
Add Kotlin MVP link
amitshekhariitbhu Feb 3, 2018
8a6c716
Update README.md
amitshekhariitbhu Feb 3, 2018
60231d1
Update README.md
amitshekhariitbhu Feb 26, 2018
04e14e6
Update Highlights Exemples
amadeu01 Mar 2, 2018
12e21f0
Merge pull request #29 from amadeu01/patch-1
amitshekhariitbhu Mar 4, 2018
56cfab0
grandle failed.
sdsyjh Mar 6, 2018
7fe5c41
Merge pull request #30 from sdsyjh/master
amitshekhariitbhu Mar 6, 2018
0028301
Optimize time complexity of filterUserWhoLovesBoth
MilkBiscuit Apr 4, 2018
b203b2a
Merge pull request #32 from MilkBiscuit/master
amitshekhariitbhu Apr 4, 2018
1c323b5
implement switch map operator sample
Apr 26, 2018
b43925e
Merge pull request #35 from tuann10/implement-switch-map
amitshekhariitbhu Apr 27, 2018
e4f2609
Update README.md
amitshekhariitbhu Aug 3, 2018
cf4fe66
Update README.md
amitshekhariitbhu Aug 3, 2018
a216616
Migrated to Android X | Updated build scripts
bapspatil Sep 5, 2018
838da0d
Code refactoring | Added AndroidX Espresso
bapspatil Sep 5, 2018
ffaaa2f
Removed ApplicationTest.java because ApplicationTestCase is deprecated
bapspatil Sep 5, 2018
98e9e16
Merge pull request #38 from bapspatil/master
amitshekhariitbhu Sep 5, 2018
e99bec0
Update gradle plugin
WeRockStar Oct 4, 2018
eb95eb3
Update RxJava and README.md
WeRockStar Oct 4, 2018
fec9e67
Merge pull request #39 from WeRockStar/master
amitshekhariitbhu Oct 5, 2018
1c5d141
- Upgraded to Java 1.8 to support lambdas.
Dec 5, 2018
6bb6146
Merge pull request #42 from mohammed-rampurawala/extended_version
amitshekhariitbhu Dec 6, 2018
83e169f
- TakeUntil Operator added.
Dec 8, 2018
2a2d2d6
Merge pull request #44 from mohammed-rampurawala/extended_version
amitshekhariitbhu Dec 8, 2018
7670833
Prevent onComplete on text submit in SearchView
Vignesh150493 Jan 19, 2019
5383793
Merge pull request #46 from Vignesh150493/master
amitshekhariitbhu Jan 19, 2019
7f4f263
Refactored code.
moshenskyi Feb 25, 2019
5012240
Merge pull request #48 from moshenskyi-nazariy/master
amitshekhariitbhu Feb 26, 2019
27cf2bb
Add Cache Example Using Concat
amitshekhariitbhu Mar 19, 2019
82c0f5b
Merge branch 'master' of github.com:amitshekhariitbhu/RxJava2-Android…
amitshekhariitbhu Mar 19, 2019
1d7b06a
Add comments for cache
amitshekhariitbhu Mar 19, 2019
3941eba
Covert to lambda
amitshekhariitbhu Mar 19, 2019
f49406b
Remove method reference
amitshekhariitbhu Mar 19, 2019
e483609
Add Implement Caching Using RxJava Operators
amitshekhariitbhu Mar 19, 2019
3037e3b
Add Zip Blog
amitshekhariitbhu Mar 20, 2019
44924bd
Add Schedulers in each observable in Zip Example
amitshekhariitbhu Mar 27, 2019
705bb84
Change Flowable to Single in Pagination
amitshekhariitbhu Apr 7, 2019
4a9bc27
Add scheduleOn for zip
amitshekhariitbhu May 30, 2019
a311cf8
Add Course link
amitshekhariitbhu Jul 1, 2019
5e156ae
Add onErrroReturn
amitshekhariitbhu Sep 21, 2019
c91b115
Update README.md
amitshekhariitbhu Nov 12, 2019
001db67
Update README.md
amitshekhariitbhu Mar 26, 2020
b5503de
Update README.md
amitshekhariitbhu Apr 20, 2020
30ef1de
Add .github
anandgaurav10 May 28, 2022
49e3dcd
Update .github
amitshekhariitbhu Sep 4, 2022
700d3b4
Update README.md
amitshekhariitbhu Sep 16, 2022
1cb52ef
Update README.md
amitshekhariitbhu Oct 3, 2022
21f6e7f
Update README.md
amitshekhariitbhu Oct 3, 2022
3652b49
Update README.md
amitshekhariitbhu Oct 3, 2022
05a5123
Update README.md
amitshekhariitbhu Oct 4, 2022
60994e4
Update README.md
amitshekhariitbhu Oct 11, 2022
0e1c933
Update README.md
amitshekhariitbhu Oct 11, 2022
a7d4dc7
Update README.md
amitshekhariitbhu Nov 9, 2022
32432ed
Update README.md
amitshekhariitbhu Jan 18, 2023
a22bb87
Update README.md
amitshekhariitbhu Jul 7, 2024
feaaf21
Delete .github directory
amitshekhariitbhu Aug 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

1. Fork it!
2. Checkout the development branch: `git checkout development`
3. Create your feature branch: `git checkout -b my-new-feature`
4. Add your changes to the index: `git add .`
5. Commit your changes: `git commit -m 'Add some feature'`
6. Push to the branch: `git push origin my-new-feature`
7. Submit a pull request against the `development` branch
112 changes: 39 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,133 +2,100 @@

# Learning RxJava 2 for Android by example

[![Mindorks](https://img.shields.io/badge/mindorks-opensource-blue.svg)](https://mindorks.com/open-source-projects)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-RxJava2%20Android%20Samples-blue.svg?style=flat)](https://android-arsenal.com/details/3/4314)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://opensource.org/licenses/Apache-2.0)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/LICENSE)

## How to use RxJava 2 in Android Application
## How to migrate from RxJava 1 to RxJava 2

### This project is for :
* who is migrating to RxJava 2
* or just started with RxJava.

### Just Build the project and start learning RxJava by examples.
## About me

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.
Hi, 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.

Because Reactive-Streams has a different architecture, it mandates changes to some well known RxJava types.
You can connect with me on:

- [Twitter](https://twitter.com/amitiitbhu)
- [YouTube](https://www.youtube.com/@amitshekhar)
- [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu)
- [GitHub](https://github.com/amitshekhariitbhu)

# Migration From RxJava 1 to RxJava 2
## Join **Outcome School** and get high paying tech job: [Outcome School](https://outcomeschool.com)

To allow having RxJava 1 and RxJava 2 side-by-side, RxJava 2 is under the maven coordinates
io.reactivex.rxjava2:rxjava:2.x.y and classes are accessible below io.reactivex.
### Just Build the project and start learning RxJava by examples.

Users switching from 1.x to 2.x have to re-organize their imports, but carefully.
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
```groovy
compile 'io.reactivex.rxjava2:rxjava:2.0.6'
compile 'io.reactivex.rxjava2:rxjava:X.X.X'
```
If you are using RxAndroid also, then add the following
```groovy
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:X.X.X'
```

# RxJava 2 Examples present in this sample project

* RxJava 2.0 Example using `CompositeDisposable` as `CompositeSubscription` and `Subscription` have
been removed.

* RxJava 2 Example using `Flowable`.

* RxJava 2 Example using `SingleObserver`, `CompletableObserver`.

* RxJava 2 Example using RxJava2 operators such as `map, zip, take, reduce, flatMap, filter, buffer, skip, merge, concat, replay`, and much more:
# RxJava 2 Operators Examples present in this sample project:

* RxJava 2 Android Samples using `Function` as `Func1` has been removed.

* RxJava 2 Android Samples using `BiFunction` as `Func2` has been removed.

* And many others android examples

# Quick Look on few changes done in RxJava2 over RxJava1

RxJava1 -> RxJava2

* `onCompleted` -> `onComplete` - without the trailing d
* `Func1` -> `Function`
* `Func2` -> `BiFunction`
* `CompositeSubscription` -> `CompositeDisposable`
* `limit` operator has been removed - Use `take` in RxJava2
* and much more.

# Operators :
* `Map` -> transform the items emitted by an Observable by applying a function to each item
* `Map` -> 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)
* `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
* `Take` -> emit only the first n items emitted by an Observable
* `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](https://outcomeschool.com/blog/rxjava-map-vs-flatmap)
* `Take` -> emit only the first n items emitted by an Observable. [Blog for reference](https://outcomeschool.com/blog/rxjava-interval-operator)
* `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
* `Concat` -> emit the emissions from two or more Observables without interleaving them. [Blog for reference](https://outcomeschool.com/blog/rxjava-concat-operator)
* `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 :

* [DisposableExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/DisposableExampleActivity.java) - Using `CompositeDisposable`
* [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)
* [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
* [SingleObserverExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/SingleObserverExampleActivity.java) - Using `SingleObserver`
* [CompletableObserverActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/CompletableObserverExampleActivity.java) - Using `CompletableObserver`
* [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
* [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)
* [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
* [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
* [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
* [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)
* [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
* [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
* [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
* [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
* [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
* [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)
* [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
* [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
* [IntervalExampleActivity](https://github.com/amitshekhariitbhu/RxJava2-Android-Samples/blob/master/app/src/main/java/com/rxjava2/android/samples/ui/operators/IntervalExampleActivity.java) - Using `Interval`
* [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
* [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)
* [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

### TODO

* Many examples are to be added
* [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)
* [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
* [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`
* [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`
* [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)

### Find this project useful ? :heart:
* Support it by clicking the :star: button on the upper right of this page. :v:

### Check out an awesome MVP architecture based project which uses RxJava2, Dagger2.
* [Android-MVP-Architecture](https://github.com/MindorksOpenSource/android-mvp-architecture)

### Check out an awesome library for fast and simple networking in Android.
* [Fast Android Networking Library](https://github.com/amitshekhariitbhu/Fast-Android-Networking)
Thanks

### Another awesome library for debugging databases and shared preferences.
* [Android Debug Database](https://github.com/amitshekhariitbhu/Android-Debug-Database)
**Amit Shekhar**\
Co-Founder @ [Outcome School](https://outcomeschool.com)

###[Check out Mindorks awesome open source projects here](https://mindorks.com/open-source-projects)
You can connect with me on:

### Contact - Let's become friend
- [Twitter](https://twitter.com/amitiitbhu)
- [Github](https://github.com/amitshekhariitbhu)
- [Medium](https://medium.com/@amitshekhar)
- [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu)
- [GitHub](https://github.com/amitshekhariitbhu)
- [Facebook](https://www.facebook.com/amit.shekhar.iitbhu)

[**Read all of our blogs here.**](https://outcomeschool.com/blog)

### License
```
Copyright (C) 2016 Amit Shekhar
Copyright (C) 2011 Android Open Source Project
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.
Expand All @@ -145,5 +112,4 @@ RxJava1 -> RxJava2

### Contributing to RxJava 2 Android Samples
Just make pull request. You are in!



30 changes: 21 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion 28
buildToolsVersion "28.0.2"

defaultConfig {
applicationId "com.rxjava2.android.samples"
minSdkVersion 16
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
Expand All @@ -17,13 +17,25 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'io.reactivex.rxjava2:rxjava:2.0.6'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.amitshekhar.android:rx2-android-networking:0.0.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test:rules:1.1.0-alpha4'
implementation 'androidx.appcompat:appcompat:1.0.0-rc02'
implementation 'androidx.recyclerview:recyclerview:1.0.0-rc02'

// RxJava2 Dependencies
implementation 'io.reactivex.rxjava2:rxjava:2.2.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'

// FastAndroidNetworking Dependency
implementation 'com.amitshekhar.android:rx2-android-networking:1.0.2'
}

This file was deleted.

21 changes: 21 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@
<activity
android:name=".ui.networking.NetworkingActivity"
android:label="@string/networking" />
<activity
android:name=".ui.cache.CacheExampleActivity"
android:label="@string/cache" />
<activity
android:name=".ui.rxbus.RxBusActivity"
android:label="@string/rx_bus" />
<activity
android:name=".ui.pagination.PaginationActivity"
android:label="@string/pagination" />
<activity
android:name=".ui.search.SearchActivity"
android:label="@string/search" />
<activity
android:name=".ui.operators.SimpleExampleActivity"
android:label="@string/simple" />
Expand Down Expand Up @@ -117,6 +126,18 @@
<activity
android:name=".ui.operators.DelayExampleActivity"
android:label="@string/delay" />
<activity
android:name=".ui.compose.ComposeOperatorExampleActivity"
android:label="@string/compose" />
<activity
android:name=".ui.operators.SwitchMapExampleActivity"
android:label="@string/switch_map" />

<activity android:name=".ui.operators.TakeWhileExampleActivity"
android:label="@string/take_while"/>

<activity android:name=".ui.operators.TakeUntilExampleActivity"
android:label="@string/take_until"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void sendAutoEvent() {
Observable.timer(2, TimeUnit.SECONDS)
.subscribe(new Consumer<Long>() {
@Override
public void accept(Long aLong) throws Exception {
public void accept(Long aLong) {
bus.send(new Events.AutoEvent());
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class ApiUser {
public String toString() {
return "ApiUser{" +
"id=" + id +
", firstName='" + firstname + '\'' +
", lastName='" + lastname + '\'' +
", firstname='" + firstname + '\'' +
", lastname='" + lastname + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void setBrand(String brand) {
public Observable<String> brandDeferObservable() {
return Observable.defer(new Callable<ObservableSource<? extends String>>() {
@Override
public ObservableSource<? extends String> call() throws Exception {
public ObservableSource<? extends String> call() {
return Observable.just(brand);
}
});
Expand Down
Loading