Skip to content

Android library for internet connection detection with callbacks.

License

Notifications You must be signed in to change notification settings

AppsArena/InternetConnectionChecker-Android

Repository files navigation

InternetChecker-Android

Android library for internet connection detection with callbacks.

Step 1. Add the JitPack repository to your build file i.e. build.gradle at the end of repositories:

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        compile 'com.github.Rupesh-Saxena:InternetConnectionChecker-Android:1.0'
	}

Manifest Permission

 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

How to use

//check internet connection and perform action
        new InternetConnection(this, new InternetConnectionListener() {
            @Override
            public void onInternetConnectionEnable() {
                //TODO PERFORM TASKS ON INTERNET CONNECTION ENABLE
		....
            }

            @Override
            public void onInternetConnectionDisable() {
                //TODO PERFORM TASKS ON INTERNET CONNECTION DISABLE
		....
            }
});

About

Android library for internet connection detection with callbacks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages