```groovy
// Put output below this line
api("com.amplifyframework:aws-api:2.14.11")
api("com.amplifyframework:core:2.14.11")
api("com.amplifyframework:aws-datastore:2.14.11")
api("com.amplifyframework:rxbindings:2.14.11")
```
Environment information
```
# Put output below this line
8.3.0
```
Please include any relevant guides or documentation you're referencing
ReachabilityMonitor detect network connection but it doesn't check whether it is connect
override val hasActiveNetwork: Boolean
get() = connectivityManager?.let { it.activeNetwork != null }
?: run {
throw DataStoreException(
"ReachabilityMonitor has not been configured.",
"Call ReachabilityMonitor.configure() before calling ReachabilityMonitor.getObservable()"
)
}
However, even when network is active, it may not connect to internet. Since sync operation in Datastore depends on ReachabilityMonitor to provide network status, it could lead to too many sync attempts when internet is not available but there is still active network.
Please kindly let me know if ReachabilityMonitor is lacking or serves a distinct purpose in Datastore. Possible enhancement I could think of:
Instead of checking activeNetwork, connectivity provider could retrieve getNetworkCapabilities and check the network capability is valid.
Network callback should have an extra [onCapabilitiesChanged()
A more fine grained detail to support different Android SDK version for network checking.
Before opening, please confirm:
Language and Async Model
Java, Kotlin, RxJava
Amplify Categories
DataStore
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
ReachabilityMonitor detect network connection but it doesn't check whether it is connect
Describe the feature request
The original commit https://github.com/aws-amplify/amplify-android/commit/dfb5b55f0b6a9f4d3b0ab3d55bb610765a824f1b#diff-8dd0015f3eddee483b38c9b008f9db975c9840c2709abbfca6a783f1b9baa8f4 adds ReachabilityMonitorImpl with a DefaultConnectivityProvider which indicates there is network available:
However, even when network is active, it may not connect to internet. Since sync operation in Datastore depends on ReachabilityMonitor to provide network status, it could lead to too many sync attempts when internet is not available but there is still active network.
Please kindly let me know if ReachabilityMonitor is lacking or serves a distinct purpose in Datastore. Possible enhancement I could think of:
Resources:
Initialization steps (if applicable)
No response
Code Snippet
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response