These are chat archives for ReactiveX/RxJava

21st
Sep 2017
Yuriy Tim
@tim4dev
Sep 21 2017 17:35

Hi. I want to wrap a listener to Observable.

Full code here https://github.com/tim4dev/dirty_code/blob/master/Rx-Listener-to-Observable/app/src/main/java/tim4dev/com/rxlistenertoobservable/MainActivity.java

On Android 4.2 "Observable Listener" (Observable, Flowable) worked fine.
On Android 8.0 "Observable Listener" (Observable, Flowable) called 2--3 times and dead.

Steps to reproduce the problem:

  • set PHONE_NUMBER to your own phone (yes, you will phone call to yourself)
  • run app on Android 8
  • call
  • press disconnect (off hook)
  • if you do it fast enough - everything will be ok
  • if you listen to short beeps and wait, the Listener dies and does not react any more.

Question: what to do?