Library to handle network state and speed
Jitpack:
- For handle network, please add this permission into your manifest.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
- Prepare dependencies:
- build.gradle project level.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2. **build.gradle** app/module level
dependencies {
implementation 'com.github.danylo-pavenko:android-network-helper:<latest_version>'
}
- For using, you can just use
INetworkStateManager
interface with NetworkStateManager
implementation. Or using extension function with Context.isNetworkAvailable
, Context.isHasConnection
or Context.isWifiConnection
functions.