Android Network Helper (Extensions)

Additional

Language
Kotlin
Version
N/A
Created
Mar 15, 2023
Updated
Mar 19, 2023 (Retired)
Owner
Danylo Pavenko (danylo-pavenko)
Contributor
Danylo Pavenko (danylo-pavenko)
1
Activity
Badge
Generate
Download
Source code

Library to handle network state and speed

Jitpack:

  1. 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" />
  1. Prepare dependencies:
    1. 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>'
}
  1. For using, you can just use INetworkStateManager interface with NetworkStateManager implementation. Or using extension function with Context.isNetworkAvailable, Context.isHasConnection or Context.isWifiConnection functions.