-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't notify when connection is restored after restarting the router #357
Labels
Comments
Thanks for reporting that. I'll have a look at this issue.
…--
Piotr Wittchen,
http://wittchen.io
pon., 22 lip 2019, 14:59 użytkownik Ahmed Mourad <[email protected]>
napisał:
*Describe the bug*
When i restart the router, i get notified that connection is lost but i
never get notified when it's restored.
*To Reproduce*
Steps to reproduce the behavior:
The code:
ReactiveNetwork.observeNetworkConnectivity(applicationContext)
.flatMap { network ->
ReactiveNetwork.checkInternetConnectivity()
.toObservable()
.map { network.state() to it }
}.map {
val (networkState, isInternetAvailable) = networkInfo
return when {
isInternetAvailable -> // connected
networkState == NetworkInfo.State.CONNECTING -> // connecting
networkState == NetworkInfo.State.DISCONNECTED -> // disconnected
else -> // disconnected
}
}.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ /* ... */ }, { it.printStackTrace() })
1. run the app (using WIFI, haven't tested it with data)
2. restart the router (the app never gets notified when connection is
restored)
*Smartphone (please complete the following information):*
- Device: Huawei Y7 Prime 2018
- OS: Android 8
- Library Version: 3.0.3
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#357?email_source=notifications&email_token=AAFJYF2R2KBU4YDWXHYANCLQAWVLXA5CNFSM4IFYLNCKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HAUEJAA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFJYF37P56YTC3RVEH46Y3QAWVLXANCNFSM4IFYLNCA>
.
|
That'd be great, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When i restart the router, i get notified that connection is lost but i never get notified when it's restored.
To Reproduce
Steps to reproduce the behavior:
The code:
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: