https://github.com/omidhaqi/kotlinnetworkchecker
https://github.com/omidhaqi/kotlinnetworkchecker
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/omidhaqi/kotlinnetworkchecker
- Owner: OmidHaqi
- Created: 2023-08-12T11:13:59.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-12T11:23:39.000Z (almost 2 years ago)
- Last Synced: 2024-11-14T06:35:10.970Z (8 months ago)
- Language: Kotlin
- Size: 1.95 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kotlin App Network Checker
1. copy NetworkChecker.kt in the folder that MainActivity.kt exist and add your package name in the first line of the file.
2. Add this lines in AndroidManifest.xml.
```bash
```
3. Use this Condition for check network.```bash
if ( NetworkChecker(this).isInternetConnected ) {
Toast.makeText(this, "Network is connected", Toast.LENGTH_SHORT).show()
}else{
Toast.makeText(this, "Network is not connected", Toast.LENGTH_SHORT).show()}
```