abuicke / SolitaryFitness

Companion app to Solitary Fitness by Charles Bronson
1 stars 0 forks source link

Test InternetStateObservable with the router plugged in without an internet/telephone connection #58

Closed abuicke closed 9 months ago

abuicke commented 9 months ago

So it can be tested with networks that are available but don't reach the internet. What happens? How long should the timeout be? Several times the timeout was not long enough to switch connections and establish it was connected. Is the isOnline() check even necessary? It seems like Android actually handles that, but I'm not sure.

abuicke commented 9 months ago

Should I re-enable emitting a default value when InternetStateObservableImpl is initialized?

init {
        applicationScope.launch {
            // Starting off with a default value of no connection
            sharedFlow.emit(NetworkState.NO_CONNECTION)
            ..........
abuicke commented 9 months ago

If the Wi-Fi and the Mobile Data are connected at the same time, and the Wi-Fi gets shut off, it can take quite a while for the Mobile Data connection to be determined to have internet availability (15+ seconds)