/ConnectionStatusLikeYoutube

A simple library to check internet every time using Broadcast Receiver like same as Youtube (online,offline)

Primary LanguageJavaApache License 2.0Apache-2.0

ConnectionStatusLikeYoutube

https://github.com/rrsaikat/ConnectionStatusLikeYoutube https://jitpack.io https://github.com/rrsaikat/ConnectionStatusLikeYoutube https://www.apache.org/licenses/LICENSE-2.0

A simple library to check internet every time using Broadcast Receiver like same as Youtube (online,offline)

TODO

Step 1

Add this dependency to the app build.gradle file:

dependencies {
        implementation 'com.github.rrsaikat:ConnectionStatusLikeYoutube:v1.0.1'
}

Step 2

Add it in your root build.gradle at the end of repositories:

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

Step 3

Sync & build with net connection.

Step 4

Finally just declare this two lines into your onCreate() or onStart() method:

NetworkChangeReceiver changeReceiver = new NetworkChangeReceiver(this);
changeReceiver.build();

NOTE

To handle errors or use this library you have to migrate your android.support into androidx . See the full project migration process at here: Click Me``

Release Notes

  • 1.0.1:
    • Latest library used of Snacky & add support for android P.
  • 1.0.0:
    • Custom snackbar added.
    • Use last version of Android studio 3.2.1

LICENSE

Copyright 2018 Md. rezwan rabbi

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.