ReactiveNetwork
ReactiveNetwork copied to clipboard
Deprecated NetworkInfo methods are used.
Since API 28 all NetworkInfo properties are deprecated https://developer.android.com/reference/android/net/NetworkInfo and it is intended not to use them but use NetworkCallback
instead.
ReactiveNetwork already uses NetworkCallback
on Marshmellow and higher https://github.com/pwittchen/ReactiveNetwork/blob/RxJava2.x/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/network/observing/strategy/MarshmallowNetworkObservingStrategy.java but still uses NetworkInfo
to construct the final Connectivity
object (https://github.com/pwittchen/ReactiveNetwork/blob/RxJava2.x/library/src/main/java/com/github/pwittchen/reactivenetwork/library/rx2/Connectivity.java)
Since methods are deprecated in API 28 it is not safe to use them in production apps. Of course it is possible to implement custom NetworkObservingStrategy
but are there any plans to implement full support of new API out of the box?
Hi,
Thanks for reporting this. I didn't know about deprecated properties of NetworkInfo
class. I'll try to update the library and get rid of deprecated code as soon as I can.
Regards, Piotr
I'm having similar problem after updating my test device to Android Pie (API-level-28). Cause when the device was in Oreo i was getting all the necessary data(specially the SSID from extraInfo field, after getting connected to a WIFI source) from the observeNetworkConnectivity methods response. Now its returning extraInfo and reason null.
Hello, any update on this?
Hi,
I didn't have time to work on this. I'll try to fix it as soon as I can.
Regards.
I had a look at this. I see that adjusting this library to the new API without breaking backward-compatibility and tests is not trivial. I think, this issue has the highest priority in this project now, so I'll focus on it first.
Hi, any news on this one?
This upgrade is not trivial and I need to find free time to do this as it's my side project. Sorry for the inconvenience. If you'd like to receive updates faster, I'm open for Pull Requests.
-- Piotr Wittchen, http://wittchen.io
wt., 10 wrz 2019, 18:20 użytkownik arkivika [email protected] napisał:
Hi, any news on this one?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pwittchen/ReactiveNetwork/issues/318?email_source=notifications&email_token=AAFJYF5ZQRI7ABIX5DIM6ADQI7CNNA5CNFSM4GPD7HW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6LVZ5Q#issuecomment-530013430, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFJYF2OH5IPQYRNBIUAQU3QI7CNNANCNFSM4GPD7HWQ .
Hi, any news on this one?
Hi,
Not yet. If you'd like to have this update faster, then I'm open for PRs as always. :-) In case of fixing this problem, I'll update this issue in the future.
Regards, Piotr
Any alternative library/util to use until this is updated? My gradle is not allowing me to compile because of this deprecated use
Looks like this is still an issue. Any updates on this?
Like I said, I'll try to do it in the meantime, but if you want to have the update faster, you can create a new PR. Project is open-source.
Any updates on this? Seeing some related issues also haven't been merged yet.