Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omidhaqi/kotlinnetworkchecker
https://github.com/omidhaqi/kotlinnetworkchecker
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/omidhaqi/kotlinnetworkchecker
- Owner: OmidHaqi
- Created: 2023-08-12T11:13:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-12T11:23:39.000Z (over 1 year ago)
- Last Synced: 2023-08-12T12:27:35.993Z (over 1 year ago)
- Language: Kotlin
- Size: 1.95 KB
- Stars: 1
- 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()}
```