2

I am need that i will be calling a completable method in the chain, after it completes, it needs to continue the chain with Map operator
Example

Single.just(someOperation())
     .flatMapCompletable{
         completableMethod()
    }
     .map{ // i need to continue here with map or some other operator
         doSomeOperation()
    }

Can anyone help me out with this ?

Stack
  • 1,164
  • 1
  • 13
  • 26

1 Answers1

4

Completable does not submit any data. Accordigly you cannot call map. If you wan to perform any actions after this use andThen

Single.just(someOperation())
     .flatMapCompletable{
         completableMethod()
    }
     .andThen{ 
         doSomeOperation()
    }

More about andThen

Marat Zangiev
  • 1,172
  • 7
  • 12