pwittchen / ReactiveNetwork

Android library listening network connection state and Internet connectivity with RxJava Observables
http://pwittchen.github.io/ReactiveNetwork/docs/RxJava2.x/
Apache License 2.0
2.53k stars 276 forks source link

Changed to not use NetworkInfo class for Lollipop and above #455

Open chaesung opened 4 years ago

chaesung commented 4 years ago

This PR introduces the following update:

Was concerned about issue #318

However I couldn't completely remove the NetworkInfo class in Connectivity class

I just changed it so that it would use the network callback api from Lollipop and above.

If you don't have time please give me some tips on how I should implement it or just dump in ideas in this PR.

I will try to work on it.

Hope to hear from you soon.

chaesung commented 4 years ago

Any feedback on this??

pwittchen commented 4 years ago

Hi @chaesung.

Thanks for your PR. I didn't have time to perform the review of your code. I'll do it soon.

Regards, Piotr

pwittchen commented 3 years ago

Code looks quite fine. Maybe small adjustments can be done after merge. I'll test it later and if everything will be ok, I'll merge it.

chaesung commented 3 years ago

@pwittchen Thanks for the approval. Would it be possible to know when it would be merged?

chaesung commented 3 years ago

@pwittchen any feedback on this?

henryglendening-hh commented 3 years ago

Has this been merged?

jortas commented 2 years ago

Please merge it

pwittchen commented 1 year ago

I checked out this branch after fixing test configuration and I see, several tests are not passing.

Unfortunately, we cannot see them here, because Travis CI were changed and this CI doesn't work anymore with old configuration. I need to fix this CI or migrate do GitHub actions...

From what I see, MarshmallowNetowrkObservingStrategy#propagateAnyConnectedState() method, needs and update to consider NetworkState besides NetworkInfo class to make it work properly and to make tests pass. You can try to fix it by yourself or I can take a look at it later.

pwittchen commented 1 year ago

I took your PR and added some adjustments in PR #469 regarding library logic and tests. I need to verify that and maybe add some more tests for the newer Android API. If everything will be working fine, I'll merge it.