๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๋นˆ ๊ตฌ๋ฉ ์ฑ„์šฐ๊ธฐ

[Android] deprecated AsyncTask ์ˆ˜์ • > RxJava ์ด์šฉํ•˜๊ธฐ

https://androidsrc.net/replace-android-asynctask-rxjava/

 

Replace Android AsyncTask with RxJava - AndroidSRC

Today is the day when we will say goodbye to AsyncTask. It will be replaced by our new friend RxJava which is quite in news now a days. We will be covering how RxJava...

androidsrc.net

 

        Observable.just(input)
                .map(this::doInBackground)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .doOnSubscribe(this::onPreExecute)
                .subscribe(this::onPostExecute);