All Projects → mthli → RxCoroutineSchedulers

mthli / RxCoroutineSchedulers

Licence: Apache-2.0 license
Kotlin Coroutines as RxJava Schedulers 😈

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to RxCoroutineSchedulers

Kpermissions
A Kotlin library which helps to request runtime permissions in Android.
Stars: ✭ 253 (+716.13%)
Mutual labels:  rxjava, coroutines
Inline Activity Result
Receive Activity results inline, without any boilerplate. Optional coroutines and RxJava support.
Stars: ✭ 298 (+861.29%)
Mutual labels:  rxjava, coroutines
modern-android
Modern Android Project Skeleton
Stars: ✭ 17 (-45.16%)
Mutual labels:  rxjava, coroutines
Mvvm Kotlin Android Architecture
MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit5
Stars: ✭ 1,014 (+3170.97%)
Mutual labels:  rxjava, coroutines
Assure
A Kotlin library that makes biometric authentication quick and easy.
Stars: ✭ 55 (+77.42%)
Mutual labels:  rxjava, coroutines
Awesome Android Kotlin Apps
👓 A curated list of awesome android kotlin apps by open-source contributors.
Stars: ✭ 1,058 (+3312.9%)
Mutual labels:  rxjava, coroutines
Runtimepermission
Simpliest way to ask runtime permissions on Android, no need to extend class or override permissionResult method, choose your way : Kotlin / Coroutines / RxJava / Java7 / Java8
Stars: ✭ 860 (+2674.19%)
Mutual labels:  rxjava, coroutines
Fountain
Android Kotlin paged endpoints made easy
Stars: ✭ 175 (+464.52%)
Mutual labels:  rxjava, coroutines
NewsReader
Android News Reader app. Kotlin Coroutines, Retrofit and Realm
Stars: ✭ 21 (-32.26%)
Mutual labels:  rxjava, coroutines
BlueFlow
Android Bluetooth classic API wrapped in Coroutines Flow.
Stars: ✭ 64 (+106.45%)
Mutual labels:  coroutines
DirectCurrencyConverter
Currency Converter App for Android showing usage of Flow, Live Data, Coroutines, Hilt - (Clean Architecture)
Stars: ✭ 40 (+29.03%)
Mutual labels:  coroutines
WanAndroidJetpack
🔥 WanAndroid 客户端,Kotlin + MVVM + Jetpack + Retrofit + Glide。基于 MVVM 架构,用 Jetpack 实现,网络采用 Kotlin 的协程和 Retrofit 配合使用!精美的 UI,便捷突出的功能实现,欢迎下载体验!
Stars: ✭ 124 (+300%)
Mutual labels:  coroutines
RxProperty
RxJava binding APIs for observable fields and observable collections from the Data Binding Library
Stars: ✭ 17 (-45.16%)
Mutual labels:  rxjava
asynchronous
A D port of Python's asyncio library
Stars: ✭ 35 (+12.9%)
Mutual labels:  coroutines
UnityHFSM
A simple yet powerful class based hierarchical finite state machine for Unity3D
Stars: ✭ 243 (+683.87%)
Mutual labels:  coroutines
BookReader
📕 "任阅" 网络小说阅读器,3D翻页效果、txt/pdf/epub书籍阅读、Wifi传书~
Stars: ✭ 6,113 (+19619.35%)
Mutual labels:  rxjava
bitcoin-market-android
Bitcoin Market app shows you the current Bitcoin market price and price chart of different time intervals 💰
Stars: ✭ 284 (+816.13%)
Mutual labels:  coroutines
TVMaze-Cache
A sample to showcase Kotlin, MVVM, Koin, Coroutines, StateFlow, Room, WorkManager, Retrofit, DataBinding and Unit test.
Stars: ✭ 22 (-29.03%)
Mutual labels:  coroutines
Fineract-CN-mobile
DEPRECATED project - Check the Apache fineract-cn-mobile project instead
Stars: ✭ 17 (-45.16%)
Mutual labels:  rxjava
Kotlin-Starter
☕ Kotlin starter with rx
Stars: ✭ 22 (-29.03%)
Mutual labels:  rxjava

RxCoroutineSchedulers

Kotlin Coroutines as RxJava Schedulers 😈

The main idea comes from Allow converting CoroutineDispatcher to RxJava scheduler 💡

Examples

Use extension function asScheduler() at your target CoroutineDispatcher 😎

val disposable = Observable
  .create(...)
  .subscribeOn(Dispatchers.IO.asScheduler())
  .observeOn(Dispatchers.Main.asScheduler())
  .subscribe(...)

You can also specify a CoroutineScope that all coroutine jobs will run in it and canceled by it 💅

val disposable = Observable
  .create(...)
  .subscribeOn(Dispatchers.IO.asScheduler(yourScope))
  .observeOn(Dispatchers.Main.asScheduler(yourScope))
  .subscribe(...)

Attention:

subscribeOn and observeOn must run in same scope,

otherwise you need to call disposable.dispose() after call yourScope.cancel() 👀

Gradle

At your top-level build.gradle ⬇️

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}

And then at your project build.gradle ⬇️

dependencies {
  // for RxJava2 users, use v2.0.3
  implementation 'com.github.mthli:RxCoroutineSchedulers:v3.0.3'
}

Done 🍻

Maven

At your pom.xml ⬇️

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>
<dependencies>
  <dependency>
    <groupId>com.github.mthli</groupId>
    <artifactId>RxCoroutineSchedulers</artifactId>
    <!-- for RxJava2 users, use v2.0.3 -->
    <version>v3.0.3</version>
  </dependency>
</dependencies>

Done 🍻

License

Copyright 2020 Matthew Lee

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].