ReactiveNetwork
ReactiveNetwork copied to clipboard
fixes in the code and tests according to PR #455 related to utilization of the NetworkState class
fixes in the logic of MarshmallowNetworkObservingStrategy and tests according to PR #455 related to utilization of the NetworkState class
I also updated code of the sample apps. Unfortunately, In the Android emulator, network changes are not invoked for some reason. They're invoked only when I restart the Activity. On the RxJava2.x branch it works fine on the emulator, so it needs fix.
Current analysis: Logic in MarshmallowNetworkObservingStrategy#propagateAnyConnectedState needs to be updated. Probably new strategy QNetworkObservingStrategy needs to be created to handle this on Android Q. In general propagateAnyConnectedState receives 5 notifications and for NetworkState logic is incorrect to propagate state change.
I finally fixed handling state in the correct manner, so the last available connected network is propagated to the end of the stream if we lost connectivity with one network while being connected to two networks or more.
Now a few more things needs to be done:
- [ ] fixing tests, which use removed code to apply the same logic with different code
- [ ] moving new code from the
MarshmallowNetworkObservingStrategyto theQNetworkObservingStrategyand rolling back old code to the changed file - [ ] serving
QNetworkObservingStrategyfor Android Q and higher