Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 679 Bytes

README.md

File metadata and controls

31 lines (25 loc) · 679 Bytes

NetDetect

An Android library to check actual internet connectivity.

How To Use

  1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:
allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}
  1. Add the dependency:
implementation 'com.github.SalahoAmro:NetDetect:1.0.0'
  1. Initialize NetDetect in Application class:
NetDetect.init(this);
  1. Use it anywhere!
NetDetect.check((isConnected -> Toast.makeText(this, isConnected + "", Toast.LENGTH_SHORT).show()));